From: gerhard q. <gq...@sk...> - 2004-03-31 13:18:40
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Alexander, ~ sorry, you're using the pygresql-Modul, not our pyPgSQL-Modul! The needed function is getnotify(), which returns a message from your server! Look in the manuals! Gerhard - ------------- Alexander Blüm wrote: | On Wed, 31 Mar 2004 08:38:31 +0200 | gerhard quell <gq...@sk...> 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 | _______________________________________________ | Pypgsql-users mailing list | Pyp...@li... | https://lists.sourceforge.net/lists/listinfo/pypgsql-users | - -- - ------------------------------------------------------ skequell ------ ~ Gerhard Quell Software & Knowledge Engineering ~ Schützenweg 3 eMail: gq...@sk... Fon: 0731-26400651 ~ 89275 Elchingen web : http://www.skequell.de Fax: 0731-26400652 - --------------- pgp: 473EC53C - http://www.keyserver.net/en--------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAasZnvHbZD0c+xTwRAvWhAJ4u/RfYF8sYB/6cvkOrn4qn4QHazACZAYDn 5w6plDIj65556mNti5FRv38= =CEeu -----END PGP SIGNATURE----- |