mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Remove misplaced sanity check from heap_create().
Even when allow_system_table_mods is not set, we allow creation of any type of SQL object in pg_catalog, except for relations. And you can get relations into pg_catalog, too, by initially creating them in some other schema and then moving them with ALTER .. SET SCHEMA. So this restriction, which prevents relations (only) from being created in pg_catalog directly, is fairly pointless. If we need a safety mechanism for this, it should be placed further upstream, so that it affects all SQL objects uniformly, and picks up both CREATE and SET SCHEMA. For now, just rip it out, per discussion with Tom Lane.
This commit is contained in:
@@ -46,8 +46,7 @@ extern Relation heap_create(const char *relname,
|
||||
char relkind,
|
||||
char relpersistence,
|
||||
bool shared_relation,
|
||||
bool mapped_relation,
|
||||
bool allow_system_table_mods);
|
||||
bool mapped_relation);
|
||||
|
||||
extern Oid heap_create_with_catalog(const char *relname,
|
||||
Oid relnamespace,
|
||||
|
||||
Reference in New Issue
Block a user