Skip site navigation (1) Skip section navigation (2)

Re: Seeking PyGreSQL help

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)PyGreSQL(dot)org>
To: "Alastair G(dot) Hogge" <agh(at)tpg(dot)com(dot)au>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Seeking PyGreSQL help
Date: 2003-08-05 16:44:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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 "<stdin>", 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

In response to


pgsql-interfaces by date

Next:From: Frank van VugtDate: 2003-08-05 21:45:21
Subject: Re: Multi-threaded user app segfaults when using libpq with separate connections
Previous:From: Christoph HallerDate: 2003-08-05 15:03:59
Subject: Re: unicode and libpq

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group