X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A07ACD1C9F7 for ; Tue, 5 Aug 2003 16:44:22 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 19778-07 for ; Tue, 5 Aug 2003 13:43:03 -0300 (ADT) Received: from druid.net (druid.net [216.126.72.98]) by svr1.postgresql.org (Postfix) with ESMTP id E7AA2D1C9ED for ; Tue, 5 Aug 2003 13:44:11 -0300 (ADT) Received: by druid.net (Postfix, from userid 1000) id E7E2E1B42; Tue, 5 Aug 2003 12:44:15 -0400 (EDT) From: "D'Arcy J.M. Cain" Reply-To: darcy@PyGreSQL.org Organization: PyGreSQL Development Group To: "Alastair G. Hogge" , pgsql-interfaces@postgresql.org Subject: Re: Seeking PyGreSQL help Date: Tue, 5 Aug 2003 12:44:15 -0400 User-Agent: KMail/1.5.2 References: <200308051816.06256.agh@tpg.com.au> <200308050845.23344.darcy@PyGreSQL.org> <200308052253.37438.agh@tpg.com.au> In-Reply-To: <200308052253.37438.agh@tpg.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308051244.15331.darcy@PyGreSQL.org> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/25 X-Sequence-Number: 4379 On Tuesday 05 August 2003 08:53, Alastair G. Hogge wrote: > In pyhton? > temp = "hello" > > >>> db.query("INSERT INTO test VALUES (temp, NULL)") > > Traceback (most recent call last): > File "", line 1, in ? > _pg.error: ERROR: Attribute "temp" not found Right. That's the error. You are trying to pass a Python variable name to the PostgreSQL backend. Go to the Python page and look up formatting with the '%' operator. -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org