Referencing pg_user

From: Benj <bastabob(at)flash(dot)net(dot)ph>
To: pgsql-general(at)postgresql(dot)org
Subject: Referencing pg_user
Date: 2002-08-10 00:41:45
Message-ID: 20020810004145.GB2544@imagineasia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Just subscribed to the list.

How do I put a column constraint that references
the pg_user/pg_shadow system table?

I'm trying to create a table with a field attribute like this:

create table feedback (
...
usesysid integer references pg_shadow,
...
);

But I get "ERROR: PRIMARY KEY for referenced table "pg_shadow"
not found." I tried this as postgres user.

I'm putting the constraint so that only records associated with
PostgreSQL users can be inserted into the table.

--
Benjamin Oris Jr.
bastabob(at)flash(dot)net(dot)ph

Browse pgsql-general by date

  From Date Subject
Next Message Steve Lane 2002-08-10 01:48:34 Transactions in functions ( was Re: transactions, serial ids, and JDBC)
Previous Message Peter Eisentraut 2002-08-09 22:55:16 Re: SQL Comments