Re: BUG #1674: CREATE TABLE "name" (with double quotes) and
| От | Neil Conway |
|---|---|
| Тема | Re: BUG #1674: CREATE TABLE "name" (with double quotes) and |
| Дата | |
| Msg-id | 428C973A.8060208@samurai.com обсуждение исходный текст |
| Ответ на | BUG #1674: CREATE TABLE "name" (with double quotes) and resulting behavior ("Herman Bos" <hbos@osso.nl>) |
| Список | pgsql-bugs |
Herman Bos wrote: > vib=> select * from "bedrag"; > ERROR: relation "bedrag" does not exist Naturally: there is no such table, regardless of case. > vib=> select "BEDRAG" from sancties; > BEDRAG > -------- > (0 rows) Not with the SQL you provided: neilc=# select "BEDRAG" from sancties; ERROR: relation "sancties" does not exist > I was wondering if this behavior is correct. This behavior is intended, although it is true some people find it confusing. The logic is: - identifiers specified without double-quotes are folded to lower case - identifiers specified with double-quotes are not case folded So your DDL creates a table called SANCTIES since the table name is double-quoted, whereas "SELECT * FROM SANCTIES" is actually looking for a table called "sancties". See here for more info: http://www.postgresql.org/docs/8.0/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS -Neil
В списке pgsql-bugs по дате отправления: