Closed zhoukangcn closed 9 months ago
Note in https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PUBLIC that by default tables without schema names are put here.
@justinmclean Yes, I think it's better not to treat pubic
as the reserved database of system.
Instead, users should be allowed to list this database.
@Clearvive would you please take a look at this issue?
public schema is the default schema if not specifying schema names. I think we should remove public schema from SYS_PG_DATABASE_NAMES.
In the previous sections we created tables without specifying any schema names. By default such tables (and other objects) are automatically put into a schema named “public”. Every new database contains such a schema
@zhoukangcn , would you like propose a PR to fix it?
@FANNG1 i will propose a PR to fix it
Version
main branch
Describe what's wrong
In Catalog postgres, schema
public
will be filted inlistDatabases
but, user can create table in this schema. and we have many tables created in schema
public
in our production env.Meanwhile, we can listTables using this schema
curl 'http://localhost:8090/api/metalakes/metalake/catalogs/pg_test/schemas/public/tables'
Error message and/or stacktrace
As shown above
How to reproduce
use PostgresSQL Catalog
Additional context
No response