From: Nagy Laszlo Zsolt , KLTE TTK pm1 <nagylzs@dragon.klte.hu>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgresql.org>
Subject: PyGreSQL and transactions
Date: Thu, 20 Jul 2000 12:14:48 +0200 (MET DST)
Message-ID: <Pine.GSO.4.10.10007201213310.24509-100000@dragon> (raw)
Hi all.
I'm writting a text-based server program with PyGreSQL.
My first problem follows:
>>> import pg
>>> db = pg.DB('gandalf','localhost',5432,None,None,'gandalf','')
>>> db.query('BEGIN')
>>> db.query("INSERT INTO tbl(s) VALUES('value1')")
NOTICE: current transaction is aborted, queries ignored until end of transaction block
>>> db.query('commit')
>>>
The notice was sent to stderr, it seems that I have no way to catch it.
There is getnotify(), but there is no getnotice(). I must catch it,
because my server must know if the operation was successful. (It is
in a multi-tier application's middle, and sends back a message about
the operation.)
Second problem:
>>> lo = db.locreate(pg.INV_WRITE)
>>> lo
Closed large object, oid 18863
>>> lo.open(pg.INV_WRITE)
Traceback (innermost last):
File "<stdin>", line 1, in ?
IOError: can't open large object.
>>>
I have compiled the PyGreSQL module without -DNO_LARGE.
Thank in advance:
Laszlo Nagy
nagylzs@delfin.klte.hu
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-interfaces@postgresql.org
Cc: nagylzs@dragon.klte.hu
Subject: Re: PyGreSQL and transactions
In-Reply-To: <Pine.GSO.4.10.10007201213310.24509-100000@dragon>
References: <Pine.GSO.4.10.10007201213310.24509-100000@dragon>
* 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