From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Morten W(dot) Petersen" <morten(at)src(dot)no> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is level a reserved keyword? |
Date: | 2000-07-09 17:51:30 |
Message-ID: | 29176.963165090@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Morten W. Petersen" <morten(at)src(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | nsrona | 2000-07-09 20:20:42 | importing into postgres from access |
Previous Message | Tom Lane | 2000-07-09 17:46:15 | Re: Is level a reserved keyword? |