Re: Open 7.3 items - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Open 7.3 items
Date
Msg-id 200208271919.g7RJJhH00658@candle.pha.pa.us
Whole thread Raw
In response to Re: Open 7.3 items  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Open 7.3 items  (Lamar Owen <lamar.owen@wgcr.org>)
Re: Open 7.3 items  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I think we need to resolve this discussion from a week ago.  The current
code is this:
global usernames are stored just like before, e.g. postgreslocal users are stored as user@dbnamewhen connecting, global
usersadd '@' to their nameswhen connecting, local users use just their user name, no @dbname
 

Tom likes this because it is the fewer global users who have to append
the '@'.

Vince and Peter think that it should be local users adding '@' when
connecting because:
they have an @ sign in their name anywayglobal users should be able to connect unchanged

I can foresee a time when we will have longer usernames, and local users
will be able to connect with the full user@dbname, and we can allow
user@ as a shortcut.

In summary, I prefer to change the code to have local users append the
'@'.

Comments?  

It is an easy change and prevents what is a very confusing situation
where we add '@' for users who don't have @, and remove '@' for users
who have it.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> Tom Lane writes:
> 
> > Peter Eisentraut <peter_e@gmx.net> writes:
> > > I'm concerned that we leave essentially no migration path, that is, the
> > > ability to turn the feature on to try it out without immediately breaking
> > > every application.
> >
> > Uh ... what?  I fail to understand your objection.  AFAICS the only
> > apps that could be "broken" are scripts that have usernames hardwired
> > into them ...
> 
> I'm completely lost between all the proposals about where the @ is going
> to be specified, added, or removed.  What happens on the client side and
> what happens on the server side?
> 
> All I would like to see is that I can turn on this feature and nothing
> changes as long as I don't add any "local users".  Yes, that includes
> hard-wired user names on the client side.  Of course there are various
> degrees of hard-wiring, but what if the ISP admin updates to 7.3 and wants
> to turn on the feature for new clients?  Does he tell all his existing
> clients that they must update their user names?  Possibly, these users got
> their database access with a shell account and don't specify the user name
> at all because it defaults to the OS user name.  Does that continue to
> work?
> 
> -- 
> Peter Eisentraut   peter_e@gmx.net
> 
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: bug in COPY
Next
From: Bruce Momjian
Date:
Subject: Re: SET SCHEMA?