From: | Kelly SACAULT <kelly(dot)sacault(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Chris Travers <chris(at)metatrontech(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5308: How to disable Case sensitivity on naming identifiers |
Date: | 2010-02-05 18:59:25 |
Message-ID: | 212d39f31002051059h9973a5bi6028973f81a538e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)us>
> Tom Lane wrote:
> > Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > > Bruce Momjian escribió:
> > >> 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(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2010-02-05 19:40:52 | Re: BUG #5315: Unlisted keyword WINDOW |
Previous Message | Gianfranco Frau | 2010-02-05 11:53:06 | BUG #5316: not handled error in inherit queries |