Re: SQL INSERT bug with 6.5.3 and 7.0.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: SQL INSERT bug with 6.5.3 and 7.0.2
Date
Msg-id 11839.961989676@sss.pgh.pa.us
Whole thread Raw
In response to SQL INSERT bug with 6.5.3 and 7.0.2  (John Gotts <jgotts@ww2.tqstats.com>)
List pgsql-general
John Gotts <jgotts@ww2.tqstats.com> writes:
> fmfts=# insert into contact_people (user_id,name,position,email_address) values ('jgotts','hello',null,null);
> ERROR:  parser: parse error at or near "position"
> fmfts=# insert into contact_people (user_id,name,"position",email_address) values ('jgotts','hello',null,null);
> INSERT 20402 1

POSITION is an SQL reserved word.  If you want to use it as a column
name, you can, but you'll have to double-quote it every time you use it.

            regards, tom lane

pgsql-general by date:

Previous
From: John Gotts
Date:
Subject: Re: SQL INSERT bug with 6.5.3 and 7.0.2
Next
From: Tom Lane
Date:
Subject: Re: Insert into a table with only a SERIAL