From: D'Arcy J.M. Cain <darcy@PyGreSQL.org>
To: Alastair G. Hogge <agh@tpg.com.au>
To: pgsql-interfaces@postgresql.org
Subject: Re: Seeking PyGreSQL help
Date: Tue, 5 Aug 2003 12:44:15 -0400
Message-ID: <200308051244.15331.darcy@PyGreSQL.org> (raw)
In-Reply-To: <200308052253.37438.agh@tpg.com.au>
References: <200308051816.06256.agh@tpg.com.au>
<200308050845.23344.darcy@PyGreSQL.org>
<200308052253.37438.agh@tpg.com.au>
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
http://www.PyGreSQL.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: darcy@PyGreSQL.org, agh@tpg.com.au
Subject: Re: Seeking PyGreSQL help
In-Reply-To: <200308051244.15331.darcy@PyGreSQL.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox