Re: stupid insert error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David(dot)Bear(at)asu(dot)edu
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: stupid insert error
Date: 2005-06-24 00:48:58
Message-ID: 20712.1119574138@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

David Bear <David(dot)Bear(at)asu(dot)edu> writes:
> I guess I'm too stupid to see the error, but I don't understand why
> the following fails.

> insert into person3 (asuid, fname, lname, addedby, addedon,
> slopbucket) values ("123455", "name", "name", "entered", "12/12/2004", NULL);
> ERROR: column "123455" does not exist

You want single quotes not double quotes. Double quotes are for
identifiers, single quotes are for literals. See
http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
and the following section.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message 李江华 2005-06-24 00:53:59 Re: stupid insert error
Previous Message Bruno G. Albuquerque 2005-06-24 00:46:23 Re: stupid insert error