Re: Upper / lower cases on table and column names

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Upper / lower cases on table and column names
Дата
Msg-id 20021025054139.C34720-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Upper / lower cases on table and column names  (Reiner Dassing <dassing@wettzell.ifag.de>)
Список pgsql-sql
On Fri, 25 Oct 2002, Reiner Dassing wrote:

> I was trying to adopt a database application to PostgreSQL.
> (It is written for MySQL and Oracle using perl)
>
> During this process I recognized the phenomena that upper case letters
> of table names and column names are not preserved
> in PostgreSQL.
> Is this a "featue" of PostgreSQL or do I miss something?

There's some question about whether it should instead fold to upper
case, but in any case its a sort of cheat to handle the case
insensitivity of regular identifiers.

> create table data ( Id int not null, textId int not null);
> create table Data ( Id int not null, textId int not null);
>
> results in:
> ERROR:  Relation 'data' already exists
>
> In the interpretation of my application table 'data' and 'Data' is something
> different.

AFAICT it shouldn't be.  SQL92 basically says that two regular identifiers
are the equivalent if the identifer bodies compare equally.  The
identifier bodies of a regular identifier are equivalent to an identifier
body in which each lower-case character is replaced with an upper case
one.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: Upper / lower cases on table and column names
Следующее
От: Tim Perdue
Дата:
Сообщение: Foreign character struggles