From: | "Anthony E (dot) Greene" <agreene(at)pobox(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Database and table name case sensitivity |
Date: | 2001-02-09 05:40:36 |
Message-ID: | 20010209004036.G953@cp5340 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 08 Feb 2001 19:23:47 Ben Leslie wrote:
>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);
If you need to preserve the case, you will have to use double quotes when
creating and querying:
CREATE TABLE "BaseObject" (trivial int4);
SELECT * from "BaseObject";
This also applies to attributes (column names).
Tony
--
Anthony E. Greene <agreene(at)pobox(dot)com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Chat: AOL/Yahoo: TonyG05 ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas T. Thai | 2001-02-09 06:24:00 | Returned mail: see transcript for details (fwd) |
Previous Message | Tom Lane | 2001-02-09 03:59:22 | Re: case insensitive unique index (part 2) |