In testing my software on postgresql-8.4beta[12] I got

    ERROR:  42501: permission denied: "pg_namespace" is a system catalog
    LOCATION:  ATAddForeignKeyConstraint, tablecmds.c:4599

from my code which has a column
    schema_name name NOT NULL REFERENCES pg_namespace ON DELETE CASCADE

this despite PostgreSQL happily accepting:
    GRANT REFERENCES ON pg_namespace TO greg;

I found the change in tablecmds.c and a mention of it in PostgreSQL
Weekly News - May 17 2009, yet I don't understand why referencing
a system table in this manner should be a problem - is it?

I'm trying to have certain rows of my tables go away if certain
schemas are dropped.  Is there a preferred way to do this?

If this regression is retained, it needs to be documented in the
reference manual AND I think that an attempt to GRANT REFERENCES
privileges to a system table should not be allowed.

BTW, I'm loving most of what I see in 8.4,

_Greg

J. Greg Davidson

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to