DB-local usernames

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: pgman(at)candle(dot)pha(dot)pa(dot)us
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Ron Snyder <snyder(at)roguewave(dot)com>, Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: DB-local usernames
Date: 2002-08-06 06:43:06
Message-ID: 200208060643.g766h7S16461@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pgman wrote:
> Peter Eisentraut wrote:
> > Bruce Momjian writes:
> >
> > > OK, I have attached a patch for testing. Sample output is:
> > >
> > > $ sql -U guest test
> > > psql: FATAL: user "test.guest" does not exist
> > > $ createuser test.guest
> >
> > I will object to any scheme that makes any characters in the user name
> > magic. Two reasons: First, do it right, make a separate column.
> > Second, several tools use URI syntax to specify data sources. This will
> > break any feature that relies on being able to put special characters into
> > the user name.
> >
> > The right solution to having database-local user names is putting extra
> > information into pg_shadow regarding which database this user applies to.
> > It could be an array or some separate "authentication domain" thing.
>
> OK, if you object, you can say goodbye to this feature for 7.3. I can
> supply the patch to Marc and anyone else who wants it but I am not
> inclined nor convinced we need that level of work for this feature.
>
> So we end up with nothing.

I have given this some thought. Peter's objection was that he objects
to any change that "makes any characters in the user name magic".

I don't think my patch does that. If you don't enable the feature,
everything works just the same. If you turn it on, it unconditionally
prefixes the username with the database name and a period. You can
still have periods in the username. The code doesn't check for any
periods in the username passed to the backend.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-08-06 06:57:35 Re: SQL99 CONVERT() function
Previous Message Bruce Momjian 2002-08-06 06:27:44 Re: contrib/ltree for 7.2 or 7.3 ?