Re: Foreign keys and pg_user table

From: dj trombley <dtrom(at)bumba(dot)net>
To: C G <csgcsg39(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign keys and pg_user table
Date: 2003-12-14 00:20:19
Message-ID: 3FDBACC3.1080307@bumba.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-12-14 00:37:06 Re: Delete all records NOT referenced by Foreign Keys
Previous Message dj trombley 2003-12-14 00:11:10 Re: Perl "with-perl" configuration option