Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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

In response to

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group