X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6AD035293C for ; Thu, 23 Jun 2005 21:41:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90594-03 for ; Fri, 24 Jun 2005 00:41:40 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id B30D65284D for ; Thu, 23 Jun 2005 21:41:34 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j5O0fYKi078835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Jun 2005 18:41:36 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j5O0fXjV039564; Thu, 23 Jun 2005 18:41:33 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j5O0fXmh039563; Thu, 23 Jun 2005 18:41:33 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 23 Jun 2005 18:41:33 -0600 From: Michael Fuhr To: David Bear Cc: pgsql-admin@postgresql.org Subject: Re: stupid insert error Message-ID: <20050624004133.GA39472@winnie.fuhr.org> References: <20050624001203.GL398@asu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050624001203.GL398@asu.edu> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/184 X-Sequence-Number: 17939 On Thu, Jun 23, 2005 at 05:12:03PM -0700, David Bear wrote: > > 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 > > is the double quote byting me? String constants use single quotes (or dollar quotes as of 8.0); double-quoted strings are interpreted as identifiers. See "Lexical Structure" in the "SQL Syntax" chapter of the documentation: http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-LEXICAL If I'm not mistaken, this distinction is defined in the SQL standard. -- Michael Fuhr http://www.fuhr.org/~mfuhr/