Re: BUG #5308: How to disable Case sensitivity on naming identifiers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kelly SACAULT <kelly(dot)sacault(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, chris(at)metatrontech(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5308: How to disable Case sensitivity on naming identifiers
Date: 2010-02-03 19:30:06
Message-ID: 603c8f071002031130m28957c51uab9764933ef3447d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Feb 3, 2010 at 2:13 PM, Kelly SACAULT <kelly(dot)sacault(at)gmail(dot)com> wrote:
> Here is what I read from the officiel manual :
> http://www.postgresql.org/docs/8.0/static/sql-syntax.html
>
> stating that :
> ".. Identifier and key word names are case insensitive..."
>
> This is not the truth at all and I think that this statement must be
> corrected in the manual regarding the below observation

It's completely true. Identifiers are most definitely
case-insensitive, unless of course you quote them. This is documented
on the very same web page you just quoted, a little far down:

Quoting an identifier also makes it case-sensitive, whereas unquoted
names are always folded to lower case. For example, the identifiers
FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo"
and "FOO" are different from these three and each other. (The folding
of unquoted names to lower case in PostgreSQL is incompatible with the
SQL standard, which says that unquoted names should be folded to upper
case. Thus, foo should be equivalent to "FOO" not "foo" according to
the standard. If you want to write portable applications you are
advised to always quote a particular name or never quote it.)

You may not like the current behavior (that's up to you), but I don't
believe there's any problem with how it's documented.

...Robert

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Chris Travers 2010-02-03 19:36:51 Re: BUG #5308: How to disable Case sensitivity on naming identifiers
Previous Message Kelly SACAULT 2010-02-03 19:13:56 Re: BUG #5308: How to disable Case sensitivity on naming identifiers