Thread: pgsql/src backend/catalog/aclchk.c backend/cat ...

pgsql/src backend/catalog/aclchk.c backend/cat ...

From
tgl@postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql
Changes by:    tgl@postgresql.org    02/04/12 16:38:31

Modified files:
    src/backend/catalog: aclchk.c catalog.c heap.c index.c
                         namespace.c
    src/backend/commands: analyze.c command.c creatinh.c indexcmds.c
                          rename.c trigger.c vacuum.c
    src/backend/executor: execUtils.c
    src/backend/optimizer/util: plancat.c
    src/backend/tcop: utility.c
    src/backend/utils/cache: inval.c relcache.c
    src/include/catalog: catalog.h
    src/test/regress/expected: alter_table.out errors.out
    src/test/regress/sql: alter_table.sql errors.sql

Log message:
    Checking to decide whether relations are system relations now depends
    on the namespace not the name; pg_ is not a reserved prefix for table
    names anymore.  From Fernando Nasser.


Re: pgsql/src backend/catalog/aclchk.c backend/cat ...

From
Peter Eisentraut
Date:
Tom Lane writes:

>     Checking to decide whether relations are system relations now depends
>     on the namespace not the name; pg_ is not a reserved prefix for table
>     names anymore.  From Fernando Nasser.

But the schema for system catalogs is supposed to be called
definition_schema.

--
Peter Eisentraut   peter_e@gmx.net


Re: pgsql/src backend/catalog/aclchk.c backend/cat ...

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> But the schema for system catalogs is supposed to be called
> definition_schema.

(1) AFAICT from the spec, DEFINITION_SCHEMA is not allowed to be
accessed directly from SQL statements, thus whether it really exists
or not is a matter of theology, not an interesting question for spec
conformance.

(2) In our case there are multiple special namespaces (pg_catalog,
pg_toast, pg_temp_XXX, maybe some more in the future) and so having
just one reserved schema name isn't going to do anyway.  It seems
appropriate to move our traditional "pg_ prefix is reserved" notion
over to the domain of schema names, even though we no longer have to
have it at the table level.

            regards, tom lane