Re: How to determine if a user exists..
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Dominic J. Eidson" <sauron@the-infinite.org>
Cc: pgsql-hackers@postgresql.org
Date: 2001-04-23T14:02:27Z
Lists: 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