Re: Unquoted column names fold to lower case - Mailing list pgsql-sql

From creechy
Subject Re: Unquoted column names fold to lower case
Date
Msg-id 1401256026003-5805199.post@n5.nabble.com
Whole thread Raw
In response to Re: Unquoted column names fold to lower case  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List 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.



pgsql-sql by date:

Previous
From: Steve Wampler
Date:
Subject: Re: Set flag column on update if other columns change?
Next
From: Gary Stainburn
Date:
Subject: Three way foreign keys