use pg_catalog for foreign key constraint

From: Jonathan Hedstrom <jhedstrom(at)desc(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: use pg_catalog for foreign key constraint
Date: 2004-12-16 18:25:17
Message-ID: 41C1D30D.8040305@desc.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Does anyone know if it is possible to use system catalogs in foreign key
constraints in Postgres 7.4.1?

My sample table:
*
CREATE TABLE tbl_reference (
reference_id SERIAL PRIMARY KEY,
from_table NAME NOT NULL REFERENCES pg_catalog.pg_class(relname),
from_id INTEGER,
to_table NAME NOT NULL REFERENCES pg_catalog.pg_class(relname),
to_id INTEGER
);*

The error I get when I try to create the table:

*ERROR: permission denied for relation pg_class*

If this is a permission issue, I already have SELECT permissions on
pg_class...any ideas as to what sort of permissions need to be granted
to accomplish this?

Attachment Content-Type Size
jhedstrom.vcf text/x-vcard 236 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-16 18:38:57 Re: use pg_catalog for foreign key constraint
Previous Message Tom Lane 2004-12-16 18:17:36 Re: pl/pgsql oddity