Re: SQL INSERT bug with 6.5.3 and 7.0.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jgotts(at)linuxsavvy(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQL INSERT bug with 6.5.3 and 7.0.2
Date: 2000-06-26 03:21:16
Message-ID: 11839.961989676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Gotts <jgotts(at)ww2(dot)tqstats(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-06-26 03:27:57 Re: Insert into a table with only a SERIAL
Previous Message John Gotts 2000-06-26 01:32:34 Re: SQL INSERT bug with 6.5.3 and 7.0.2