pgsql: Remove misplaced sanity check from heap_create().

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove misplaced sanity check from heap_create().
Date: 2012-06-14 14:01:52
Message-ID: E1SfAcS-000794-4L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a475c6036752c26dca538632b68fd2cc592976b7

Modified Files
--------------
src/backend/bootstrap/bootparse.y | 3 +--
src/backend/catalog/heap.c | 18 ++----------------
src/backend/catalog/index.c | 3 +--
src/include/catalog/heap.h | 3 +--
4 files changed, 5 insertions(+), 22 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-06-14 14:13:37 pgsql: Add new function log_newpage_buffer.
Previous Message Robert Haas 2012-06-14 13:48:30 pgsql: Remove RELKIND_UNCATALOGED.