Re: BUG #5511: Handling of case in Username and database names are inconsistant.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brett Sutton" <bsutton(at)noojee(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5511: Handling of case in Username and database names are inconsistant.
Date: 2010-06-18 14:18:21
Message-ID: 11897.1276870701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Brett Sutton" <bsutton(at)noojee(dot)com(dot)au> writes:
> Essentially if you peform:
> create user Abc;
> Postgres creates a user abc (as expected).

Yeah, because *in the context of SQL* the standard mandates
case-folding. But note that the actual user name here is "abc".
Not "Abc".

> The problem is that you cannot the use mixed case name in a jdbc url.import

I'm not sure that JDBC would be doing you any favors to try to support
that. If it were to fold case for usernames in connection URLs, then
you'd have a problem logging into users that actually *were* mixed case.
The next step would be to invent a quoting convention for usernames in
URLs, and then you just have a mess.

We went around on this many years ago in the context of what psql should
do with user and database names supplied on the command line. The
eventual conclusion, which has worked well since then, was that such
names should be taken as-is and not folded. Now that was partially
forced by the fact that the shell would interfere with any plausible
quoting convention, but I think it's still a good precedent for handling
user and database names in other non-SQL contexts such as URLs.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message depstein 2010-06-18 14:26:05 pg_upgrade issues
Previous Message Robert Haas 2010-06-18 11:22:21 Re: BUG #5503: error in trigger function with dropped columns