Re: Case sensitivity question . . .
От | Brent Verner |
---|---|
Тема | Re: Case sensitivity question . . . |
Дата | |
Msg-id | 20020102211025.GA13940@rcfile.org обсуждение исходный текст |
Ответ на | Case sensitivity question . . . ("Peter E. Chen" <pchen3@jhmi.edu>) |
Список | pgsql-general |
[2002-01-02 15:21] Peter E. Chen said: | Hey All, | | I'm trying to create new databases and tables. The database names and | tables always end up in lower case. Is there a way to have some upper case | letters in database and table names? Yes, quote the names... brent=# create table "A1" ( "SteakSauce" int ); CREATE brent=# \d "A1" Table "A1" Attribute | Type | Modifier ------------+---------+---------- SteakSauce | integer | Be aware that if you choose to use mixed case names, you must /always/ quote them, which introduces just enough room for human error that I'd not recommend using quoted names. brent=# INSERT INTO A1 VALUES (1); ERROR: Relation 'a1' does not exist brent=# INSERT INTO "A1" VALUES (1); INSERT 100155 1 brent=# SELECT * FROM A1; ERROR: Relation 'a1' does not exist brent=# SELECT * FROM "A1"; SteakSauce ------------ 1 (1 row) cheers. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman
В списке pgsql-general по дате отправления: