Re: Database and table name case sensitivity

Поиск
Список
Период
Сортировка
От Anthony E . Greene
Тема Re: Database and table name case sensitivity
Дата
Msg-id 20010209004036.G953@cp5340
обсуждение исходный текст
Ответ на Database and table name case sensitivity  (Ben Leslie <benno@sesgroup.net>)
Список 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@pobox.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/>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: case insensitive unique index (part 2)
Следующее
От: "Thomas T. Thai"
Дата:
Сообщение: Returned mail: see transcript for details (fwd)