Re: thread safety tests - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: thread safety tests
Date
Msg-id 40C7567C.5060605@Yahoo.com
Whole thread Raw
In response to Re: thread safety tests  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: thread safety tests
Re: thread safety tests
List pgsql-hackers
On 6/9/2004 1:44 PM, Bruce Momjian wrote:

> Jan Wieck wrote:
>> On 6/9/2004 1:04 PM, Bruce Momjian wrote:
>> 
>> > What we really need is a way to do the uid->username mapping in a
>> > thread-safe way.  Could we check the environment for $USER or $LOGNAME?
>> > Could we require them to be set for thread builds on OS's without
>> > getpwuid_r and in cases where the username is not specified in the
>> > connection string?
>> 
>> Maybe not as popular, but what about breaking backward compatibility and 
>> require the DB name to be specified, no username fallback? How many 
>> applications really rely on that feature? And people who are used to it 
>> from the commandline can set PGDATABASE in their .profile to get it back.
> 
> That is only part of where the username is used. I assume it is also
> used for connections when the username isn't supplied, not just as the
> default for the database name.
> 
> Basically on those platforms, either the username would have to be in
> the environment, or supplied as part of the connection string.
> 

We have PGUSER, PGHOST, PGPORT, PGDATABASE, all of them you can set in 
your .profile, why do we need to lookup the uid at all?


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-hackers by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Frequently updated tables
Next
From: Bruce Momjian
Date:
Subject: Re: thread safety tests