Re: DB-local usernames

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
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: Re: DB-local usernames
Date: 2002-08-06 12:20:25
Message-ID: 200208061220.g76CKPX05476@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Oh, well backend sees the user as this.is.legal.database.name.user.

The only case I can see a problem would be you have my.db.name and
db.user as legal _and_ my.db and name.db.user as legal. That is clearly
a problem becuase they appear the same when logging in.

Can anyone think of a way to get this to work _without_ pushing the
complexity into the user administration commands? That is what is
preventing me from creating a separate field in pg_shadow.

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

Hannu Krosing wrote:
> On Tue, 2002-08-06 at 08:43, Bruce Momjian wrote:
> > 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.
>
> what about :
>
> [hannu(at)taru hannu]$ createdb this.is.legal.database.name
> CREATE DATABASE
> [hannu(at)taru hannu]$ psql this.is.legal.database.name
> Welcome to psql, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help on internal slash commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> this.is.legal.database.name=#
>
> ---------------
> Hannu
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-06 12:23:54 Re: Better handling of parse errors
Previous Message Gavin Sherry 2002-08-06 12:18:00 Better handling of parse errors