From: Marco Colombo <marco@esi.it>
To: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Cc: pgsql-general@postgresql.org
Subject: Re: Python DB-API 2.0 oddity (was: I receieved an example of
Date: Mon, 02 May 2005 13:39:46 +0200
Message-ID: <1115033986.17311.41.camel@Frodo.esi> (raw)
In-Reply-To: <20050502115605.B566@hermes.hilbert.loc>
References: <1a4.372310a7.2fa6dc0b@aol.com>
<20050502115605.B566@hermes.hilbert.loc>
On Mon, 2005-05-02 at 11:56 +0200, Karsten Hilbert wrote:
> > The key is getting the "cursor". Once you have a cursor you can do inserts,
> > updates and deletes, like
> Huh ? Pardon me ? Doing inserts, updates and deletes via a
> cursor ? The PostgreSQL documentation clearly says that the
> <query> part of a cursor definition must be a SELECT:
>
> http://www.postgresql.org/docs/7.4/static/sql-declare.html
>
> (I am well aware that SELECT queries may have side
> effects that change data in the backend such as in
> "select add_new_customer()" etc.)
>
BTW, look at this page (with the Oracle driver):
http://www.zope.org/Members/matt/dco2/dco2doc
cursor.execute("INSERT INTO TEST (name, id) VALUES (:name, :id)",
name="Matt Kromer", id="1")
I believe there are databases that allow you to send SQL statements (any
kind, not only SELECTs) only in a cursor (either implicit or explicit),
hence the name for the cursor object.
.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo@ESI.it
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: marco@esi.it, Karsten.Hilbert@gmx.net, pgsql-general@postgresql.org
Subject: Re: Python DB-API 2.0 oddity (was: I receieved an example of
In-Reply-To: <1115033986.17311.41.camel@Frodo.esi>
References: <1a4.372310a7.2fa6dc0b@aol.com> <20050502115605.B566@hermes.hilbert.loc> <1115033986.17311.41.camel@Frodo.esi>
* 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