Referencing pg_user - Mailing list pgsql-general

From Benj
Subject Referencing pg_user
Date
Msg-id 20020810004145.GB2544@imagineasia.com
Whole thread Raw
List 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@flash.net.ph

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SQL Comments
Next
From: Steve Lane
Date:
Subject: Transactions in functions ( was Re: transactions, serial ids, and JDBC)