Database and table name case sensitivity

Поиск
Список
Период
Сортировка
Искать
От
Ben Leslie
Тема
Database and table name case sensitivity
Дата
Msg-id
20010209112347.A2889@sesgroup.net
Список
Дерево обсуждения
Database and table name case sensitivity Ben Leslie <benno@sesgroup.net>
Re: Database and table name case sensitivity "Anthony E . Greene" <agreene@pobox.com>
Re: Database and table name case sensitivity Peter T Mount <peter@retep.org.uk>
Re: Database and table name case sensitivity Ben Leslie <benno@sesgroup.net>
Hi all,

Just running into a few problems involving the case of table names.

I am writing a program that dynamically maps python objects into
postgres tables. These classes have mixed case names such as "BaseObject",
"AbcXyzObject" etc.

I call CREATE TABLE using the mixed case table name I want eg:

CREATE TABLE BaseObject (trivial int4);

From this I can do:

SELECT * from BaseObject - or
SELECT * from baseobject .

This is case insensitive here.

The problem I run into is that I want to later rebuild object from the
database dynamically and this requires querying the system tables.

SELECT relname from pg_class where relname not like 'pg%';

This returns the names in lower case only.

I am wondering if there is any reason that this case information is
discarded when creating tables?

Is there any neat ways around it that don't involve me having to maintain my own
table list?

If I patched postgres to store table names in a case sensitive way would 
it be accepted, what problems would this introduce?

Thanks for any help you can provide.

Cheers,

Ben Leslie

(Should this goto the hackers list??)
В списке pgsql-general по дате отправления
От: Joseph Shraibman
Дата:
От: Tom Lane
Дата:
FAQ