Re: How to determine if a user exists.. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to determine if a user exists..
Date
Msg-id 12594.988034547@sss.pgh.pa.us
Whole thread Raw
In response to How to determine if a user exists..  ("Dominic J. Eidson" <sauron@the-infinite.org>)
List pgsql-hackers
"Dominic J. Eidson" <sauron@the-infinite.org> writes:
> I am trying to add another authentication mechanism to PostgreSQL... And,
> in doing that, I need to verify the existance of an user within PG. Short
> of hacking together code from verify_password(), is there any way to check
> if a user exists in postgresql?

If you're trying to do this from the postmaster, I think the only way is
to look at $PGDATA/global/pg_pwd, which is a flat-file version of
pg_shadow.

You'd be well advised to study the existing verification mechanisms in
src/backend/libpq/.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: Replication through WAL
Next
From: Adam Rose
Date:
Subject: row name length