Re: Unquoted column names fold to lower case

From: creechy <mock(at)fakebelieve(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Unquoted column names fold to lower case
Date: 2014-05-28 05:47:06
Message-ID: 1401256026003-5805199.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Alvaro Herrera-9 wrote
> Dev Kumkar escribió:
>
> Aliases are treated just like any other identifier. The downcasing
> happens in the lexer (src/backend/parser/scan.l), which is totally
> unaware of the context in which this is happening; so there's no way to
> tweak the downcasing behavior for only aliases and not other
> identifiers.

Hi, sorry I know this is an old thread, but I'm running up against the same
issue.

This statement seems to contradict the PostgreSQL documentation regarding
identifiers. From "4.1.1. Identifiers and Key Words" in
http://www.postgresql.org/docs/8.0/static/sql-syntax.html it states

"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."

But your statement suggests that even though aliases are treated like any
other identifier, and you can quote an identifier to make it case sensitive,
this is not happening. To me this sounds like a bug.

Thoughts?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Unquoted-column-names-fold-to-lower-case-tp5762315p5805199.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2014-05-28 11:24:36 Three way foreign keys
Previous Message Steve Wampler 2014-05-27 16:23:01 Re: Set flag column on update if other columns change?