Re: case sensitivity - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: case sensitivity
Date
Msg-id 20030706122432.C61008-100000@megazone23.bigpanda.com
Whole thread Raw
In response to case sensitivity  (Shachar Shemesh <psql@shemesh.biz>)
Responses Re: case sensitivity
List pgsql-bugs
>Postgresql, instead, makes the identifiers in the query lowercase. While

Which we know is incorrect.  We should instead make it uppercase, but
that would break compatibility with older version (SQL 92 draft, 5.2 SR10)

>create table "Table" ( id int );
>select * from Table;

>You get "relation table not found".

That seems to me to be the correct results given 5.2 SR 13.

"A <regular identifier> and a <delimited identifier> are equiva-
lent if the <identifier body> of the <regular identifier> (with
every letter that is a lower-case letter replaced by the equiva-
lent upper-case letter or letters) and the <delimited identifier
body> of the <delimited identifier> (with all occurrences of
<quote> replaced by <quote symbol> and all occurrences of <dou-
blequote symbol> replaced by <double quote>), considered as
the repetition of a <character string literal> that specifies a
<character set specification> of SQL_TEXT and an implementation-
defined collation that is sensitive to case, compare equally
according to the comparison rules in Subclause 8.2, "<comparison
predicate>"."

I believe that it would require the identifiers in the following to
be the same, whereas PostgreSQL would treat them as different.
create table "TABLE"(id int);
select * from Table;

pgsql-bugs by date:

Previous
From: Curt Sampson
Date:
Subject: Re: pg_dump -t option doesn't take schema-qualified table
Next
From: Tom Lane
Date:
Subject: Re: case sensitivity