Re: Re: How to determine if a user exists..

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Dominic J(dot) Eidson" <sauron(at)the-infinite(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: How to determine if a user exists..
Date: 2001-04-23 15:34:55
Message-ID: Pine.LNX.4.30.0104231732200.758-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dominic J. Eidson writes:

> On Mon, 23 Apr 2001, Joel Burton wrote:
>
> > pg_user holds users
> >
> > (passwords in pg_shadow)
>
> I doubt the -hackers people would let me add SPI_* stuff into libpq, just
> to retrieve whether a user exists or not..

You wouldn't have to do that. There are better ways to read system tables
in the backend. See FAQ_DEV.

> My first thought was to check
> the existance of users against $PGDATA/pg_pwd... One question I'd have
> there, is whether pg_pwd always exists (or, can be relied upon existing.)?

No it doesn't and no you can't.

The best way to verify a user's existence in the context of a new
authentication method is to not do that at all. None of the other methods
do it, the existence of a user is checked when authentication has
completed and the backend starts.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-04-23 15:36:29 Re: row name length
Previous Message Hannu Krosing 2001-04-23 15:32:44 Re: RFC: planner statistics in 7.2