Foreign keys and pg_user table

From: "C G" <csgcsg39(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Foreign keys and pg_user table
Date: 2003-12-11 17:06:17
Message-ID: Law12-F64SLpRXcco2E0002af80@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All,

I'm trying to create a table where the username and email can only be
inserted into the table if the username is already in pg_user. The method
I'm trying is:

CREATE user(
usename name,
email text,
FOREIGN KEY usename REFERENCES (pg_user)
);

but I get told that "...pg_user is not a table."

Is there another way of doing what I want?

Many thanks

Colin

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2003-12-11 17:21:28 Re: Strange permission problem regarding pg_settings
Previous Message Marc G. Fournier 2003-12-11 17:02:36 Re: add column sillyness