Database and table name case sensitivity - Mailing list pgsql-general

From Ben Leslie
Subject Database and table name case sensitivity
Date
Msg-id 20010209112347.A2889@sesgroup.net
Whole thread Raw
Responses Re: Database and table name case sensitivity
Re: Database and table name case sensitivity
List pgsql-general
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 by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: Auto-timestamp generator (attached)
Next
From: Tom Lane
Date:
Subject: Re: Auto-timestamp generator (attached)