Re: Is level a reserved keyword?
От | Tom Lane |
---|---|
Тема | Re: Is level a reserved keyword? |
Дата | |
Msg-id | 29176.963165090@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Is level a reserved keyword? ("Morten W. Petersen" <morten@src.no>) |
Список | pgsql-general |
"Morten W. Petersen" <morten@src.no> writes: > We've been running a customer telephone service, and we've been storing > the customers subscription as levels; ie, we have a table, named customer > with the column "level". INSERT and SELECT have worked on this table, just > as they should; but now, after moving between two databases of the same > version, both the psql client, and the pg python adapter complains near > the word "level". Any ideas? Seems like a bug? LEVEL is a keyword, but it should not be a reserved word, and it's not in 7.0: regression=# create table f1 (level int); CREATE I believe 6.5 was missing a whole bunch of entries from the parser's list of keywords-that-can-also-be-column-names, so it doesn't surprise me that you see this problem in 6.5. You could update to 7.0 (recommended solution ;-)), or put double quotes around "level" in all your queries, or rename the column, or modify src/backend/parser/gram.y to add a production for LEVEL to the ColId list. regards, tom lane
В списке pgsql-general по дате отправления: