Re: Foreign keys and pg_user table - Mailing list pgsql-general

From dj trombley
Subject Re: Foreign keys and pg_user table
Date
Msg-id 3FDBACC3.1080307@bumba.net
Whole thread Raw
In response to Foreign keys and pg_user table  ("C G" <csgcsg39@hotmail.com>)
List pgsql-general
    Well, it's not a table!  It's a view:

dbs=# \d pg_user
     View "pg_catalog.pg_user"
   Column    |  Type   | Modifiers
-------------+---------+-----------
 usename     | name    |
 usesysid    | integer |
 usecreatedb | boolean |
 usesuper    | boolean |
 usecatupd   | boolean |
 passwd      | text    |
 valuntil    | abstime |
 useconfig   | text[]  |
View definition:
 SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb,
pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd,
pg_shadow.valuntil, pg_shadow.useconfig
   FROM pg_shadow;

So, you really want to use the pg_shadow table.

C G wrote:

>
> but I get told that "...pg_user is not a table."
>
> Is there another way of doing what I want?




pgsql-general by date:

Previous
From: dj trombley
Date:
Subject: Re: Perl "with-perl" configuration option
Next
From: Bruce Momjian
Date:
Subject: Re: Why is postgres an ORDMS