|
From: Alexander <mai...@gm...> - 2004-03-31 09:05:24
|
On Wed, 31 Mar 2004 08:38:31 +0200
gerhard quell <gq...@sk...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Do you mean:
>=20
> ~ dbcon.notices() ?
>=20
> Gerhard
> - ------------
> Alexander Bl=FCm wrote:
> | hello,
> |
> | I almost pulled out all my hair over this.
> |
> | I have a simple INSERT INTO for a couple of values. there is a
> trigger that
> | skips the insertion and spits out an INFO line telling me that this
> record is
> | already in the table (_if_ it already is, otherwise the trigger
> returns the
> | to-be-inserted-row and stays quiet)
> |
> | I just want python to get these INFO-lines right after the query:
> | 'INFO: record already in table: text7112343o'
> |
> | this doesn't work:
> | ...
> | dbcon.query("BEGIN")
> | for bla in dataarray:
> | insertstring=3D"INSERT INTO testtable VALUES ('"+bla+"')"
> | dbcon.query(insertstring)
> | print "### ", dbcon.notifies()
> | dbcon.query("COMMIT")
> | ...
> |
> | Traceback (most recent call last):
> | File "import1.py", line 22, in ?
> | print "### ", dbcon.notifies()
> | AttributeError: notifies
> |
> |
> | ...why...?
> |
> | any help's greatly appreciated.
> | alex.
> |
% python import1.py=20
INFO: record already in table: muh
###=20
Traceback (most recent call last):
File "import1.py", line 22, in ?
print "### ", dbcon.notices()
AttributeError: notices
cheers,
Alex
|