Re: Seeking PyGreSQL help

From: "Alastair G(dot) Hogge" <agh(at)tpg(dot)com(dot)au>
To: darcy(at)PyGreSQL(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Seeking PyGreSQL help
Date: 2003-08-06 01:23:31
Message-ID: 200308061123.31792.agh@tpg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Wednesday, 06 August 2003 02:44, D'Arcy J.M. Cain wrote:
> 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.
Ah I see. Thanks for that.
All is working ok now. :-)
-Al

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message John Khouri 2003-08-06 17:17:12 Disk usage problem with BLOBs using libpq
Previous Message Bruce Momjian 2003-08-06 00:22:06 ecpg problem in 7.4 beta