From: | Ben Leslie <benno(at)sesgroup(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Database and table name case sensitivity |
Date: | 2001-02-09 00:23:47 |
Message-ID: | 20010209112347.A2889@sesgroup.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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??)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-09 00:27:57 | Re: Auto-timestamp generator (attached) |
Previous Message | Joseph Shraibman | 2001-02-09 00:18:15 | Re: Auto-timestamp generator (attached) |