Received: from dragon.klte.hu (dragonwww.cic.klte.hu [193.6.138.50]) by hub.org (8.10.1/8.10.1) with ESMTP id e6KAASh36250 for ; Thu, 20 Jul 2000 06:10:28 -0400 (EDT) Received: from localhost (nagylzs@localhost) by dragon.klte.hu (8.9.3/8.9.3) with ESMTP id MAA24745 for ; Thu, 20 Jul 2000 12:14:48 +0200 (MET DST) Date: Thu, 20 Jul 2000 12:14:48 +0200 (MET DST) From: "Nagy Laszlo Zsolt , KLTE TTK pm1" X-Sender: nagylzs@dragon To: "pgsql-interfaces@postgreSQL.org" Subject: PyGreSQL and transactions Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200007/161 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 "", 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