Re: getting fetching messages...
Alexander Blüm <[email protected]> Wed, 31 Mar 2004 11:04:59 +0200
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <20040331110459.05bb4c85@smartdust> |
On Wed, 31 Mar 2004 08:38:31 +0200 gerhard quell <gquell-N1YKUU++/[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Do you mean: > > ~ dbcon.notices() ? > > Gerhard > - ------------ > Alexander Blüm 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="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 INFO: record already in table: muh ### Traceback (most recent call last): File "import1.py", line 22, in ? print "### ", dbcon.notices() AttributeError: notices cheers, Alex ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click