Re: Database Name Case Sensitivity

From: Joel Burton <jburton(at)scw(dot)org>
To: ADBAAMD <adba(dot)amdocs(at)bell(dot)ca>
Cc: "Brian T(dot) Allen" <brian(at)gzmarketing(dot)com>, Shaw Terwilliger <sterwill(at)sourcegear(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Database Name Case Sensitivity
Date: 2001-04-05 21:02:47
Message-ID: Pine.LNX.4.21.0104051658590.30426-100000@olympus.scw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Thu, 5 Apr 2001, ADBAAMD wrote:

> Brian T. Allen wrote:
>
> > I just ran into that too, and find it most undesirable. I don't know
> > whether that is part of the SQL spec or not, but it seems very odd. The
> > queries seem to be converted to lowercase before they ever reach the SQL
> > engine.
>
> Correct me if I'm wrong, but doesn't it look like a trend in PostgreSQL
> development? Instead of adding options and keeping the standard or
> previous behaviour, a new behaviour is attached to old syntax, and if
> you want to keep the standard or old results you have to do something else.

Hmmm. I'm not sure that's a charitable reading of the fantastic work of
the Global Development Group. They seem *quite* sensitive to not breaking
existing stuff. (In fact, for people like me, who work in small IT
departments, and love to rebuild systems, sometimes they seem *too*
concerned with not breaking old stuff! ;-) )

> The "Right Thing"(TM) to do in this case would be to be case insensitive
> by default, according to the traditional (if not standard) SQL practice,
> and do case sensitiveness if using quotes.

PostgreSQL *does* do what you'd expect. It is
'case-insensitive-appearing'.

AFAIK, it's only when using the

\c dbname

in psql that you have different behavior (that it cares if you specify in
in the correct case.)

Perhaps more consistent would be

\c dbname is converted to lowercase
\c "DBname" is treated, case insensitive

(which is how everything else in the PG world works.)

But, to substitue this now would break existing apps, wouldn't it? ;-)

--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Maurice Balick 2001-04-05 21:17:44 locked up backends
Previous Message Hector Miranda 2001-04-05 20:56:48 Problem with large tables

Browse pgsql-novice by date

  From Date Subject
Next Message Peter Eisentraut 2001-04-05 21:39:08 Re: Database Name Case Sensitivity
Previous Message Joel Burton 2001-04-05 20:40:20 diff -c pgsql mysql (Was Database Name Case Sensitivity)