Re: BUG #5308: How to disable Case sensitivity on naming identifiers - Mailing list pgsql-bugs

From Kelly SACAULT
Subject Re: BUG #5308: How to disable Case sensitivity on naming identifiers
Date
Msg-id 212d39f31002051059h9973a5bi6028973f81a538e@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5308: How to disable Case sensitivity on naming identifiers  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Hi everybody,

Many thanks for all your comments.

It appears that clarity is very important in a user manual. I like both
Chris and Tom 's expression.

Chris :
*"Unless double-quoted, all identifiers are folded to lower case,
making comparisons generally case insensitive.  The SQL standard
mandates folding identifiers to upper case, but the consensus among
the PostgreSQL development team is that folding to lower case is
better.   If double-quotes are not used ever, or are used consistently
throughout the application, this poses no compatibility problems in
terms of SQL queries."
*
Tom :
*"Key words and unquoted identifiers are case insensitive..."*

Personally, I prefer the Chris's one as it is more precise and detailed on
what PostgreSQL is doing when it processes SQL statements.
*
Now knowing that particularity, I will use PostgreSQL accordingly*.

At last, regarding SQL standards, in future releases of PostgreSQL, I would
like to remind my wish to see the suggested feature beside the "lower case
folding chosen by PostgreSQL dev. team".

Let see this example  :
CREATE TABLE "EdtIndexCheck"
(
  "Id" integer NOT NULL,
  "SiteId" integer,
  "CheckDate" timestamp without time zone,
  "IndexIn" integer,
  "IndexOut" integer,
  "AmountBilled" double precision,
  CONSTRAINT "PK_EdtIndexCheck" PRIMARY KEY ("Id")
)

When browsing tables and columns in pgadmin or psql, I see this (that is
very fine and good reading) :

EdtIndexCheck
    Id
    SiteId
    CheckDate
    IndexIn
    IndexOut
    AmountBilled

... and would be allowed to write queries anyway without having to use the
double-quotes like :
SELECT id, siteId, IndexIn, IndexOut, AmountBilled FROM EdtIndexCheck;

As as result, I get a friendly reading in pgadmin or psql, and have an
easier and quicker way in expressing sql statements.

I agree this feature is *not essential* but is definitely a *friendly
one*as seen in other SGBDR. This feature could be optional in other to
preserve
compatibility.

Very best regards,

Kelly



2010/2/3 Bruce Momjian <bruce@momjian.us>

> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> > > Bruce Momjian escribi=F3:
> > >> I found one place in the docs where this wasn't immediately clear, so
> I
> > >> applied the attached documentation patch.
> >
> > > I liked Tom's suggestion better, because then you don't start
> > > questioning about quoting key words or not.
> >
> > Yes, exactly, that was why I changed the ordering.  I had always thought
> > that the reference to "names" of keywords was a bit off-key, too.
>
> Yea, I like Tom's wording better too.
>
> --
>  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
>  EnterpriseDB                             http://enterprisedb.com
>
>  + If your life is a hard drive, Christ can be your backup. +
>

pgsql-bugs by date:

Previous
From: "Gianfranco Frau"
Date:
Subject: BUG #5316: not handled error in inherit queries
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #5315: Unlisted keyword WINDOW