Re: pg_role vs. pg_shadow or pg_user - Mailing list pgsql-general

From Alexander Reichstadt
Subject Re: pg_role vs. pg_shadow or pg_user
Date
Msg-id A3A1A46F-987E-4121-8C86-C629D690983A@mac.com
Whole thread Raw
In response to Re: pg_role vs. pg_shadow or pg_user  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
The 8.1 version of the docu explicitly outlined the migration, the 9.1 version no longer covers the way things were before 8.1. In the meantime I also found <http://www.postgresql.org/docs/9.0/interactive/role-membership.html> which cleared things up exhaustively and by example.

Alex

 

Am 14.03.2012 um 22:52 schrieb Tom Lane:

Alexander Reichstadt <lxr@mac.com> writes:
in the documentation of 8.1 the concept of roles is outlined compared
to users and groups at
<http://www.postgresql.org/docs/8.1/static/user-manag.html>.

Um ... why are you reading 8.1 documentation while running 9.1?  There
are likely to be some obsolete things in there.

I also read today that pg_shadow is the real table containing the
users as opposed to pg_user which is only a view and one never
displaying anything but **** for the password. I don't have the link
where that was,

Whereever it was, it was even more obsolete than the 8.1 docs.
pg_shadow has been a view (on pg_authid) for quite a while now.
Try "\d+ pg_shadow" in psql.

The reason this is such a mess is that we've changed the catalog
representation several times, each time leaving behind a view that
was meant to emulate the old catalog.  For some time now, pg_authid
has been the ground truth, but it stores entries for both login and
non-login roles, which more or less correspond to what used to be
users and groups.  pg_roles is the only non-protected view that
shows you all the entries.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: yum repository packages 9.0 and 9.1 libpq conflict
Next
From: Martin Gregorie
Date:
Subject: Re: copy in date string "00-00-00 00:00:00"