Skip site navigation (1) Skip section navigation (2)

referencing system catalogs

From: elein <elein(at)varlena(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: elein <elein(at)varlena(dot)com>
Subject: referencing system catalogs
Date: 2004-06-27 00:31:11
Message-ID: 20040626173111.T30062@cookie.varlena.com (view raw or flat)
Thread:
Lists: 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(at)varlena(dot)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.


Responses

pgsql-general by date

Next:From: Stephan SzaboDate: 2004-06-27 01:13:06
Subject: Re: referencing system catalogs
Previous:From: jayDate: 2004-06-26 23:47:34
Subject: postgresql on debian

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group