referencing system catalogs - Mailing list pgsql-general

From elein
Subject referencing system catalogs
Date
Msg-id 20040626173111.T30062@cookie.varlena.com
Whole thread Raw
Responses Re: referencing system catalogs  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Can someone explain the reasoning behind not allowing
a user table to contain a foreign key of a system table?

For example:

create table myusers (
    login    text    references pg_catalog.pg_shadow(usename),
    ...
);

Fails with a message about using system catalogs.
Using pg_user fails because it is a view and not a table.

Is it because updates to the catalogs can be done outside
of transactions?  Is that a good enough reason?

thanks,

elein
============================================================
elein@varlena.com        Varlena, LLC        www.varlena.com

          PostgreSQL Consulting, Support & Training

PostgreSQL General Bits   http://www.varlena.com/GeneralBits/
=============================================================
I have always depended on the [QA] of strangers.


pgsql-general by date:

Previous
From: jay
Date:
Subject: postgresql on debian
Next
From: Stephan Szabo
Date:
Subject: Re: referencing system catalogs