Re: does the executemany() limitation with result sets apply to INSERT..RETURNING ?
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno dom, 01/03/2009 alle 15.07 -0500, Michael Bayer ha scritto: > - executemany() now return the numer of total INSERTed or UPDATEd > rows. Note that, as it has always been, executemany() should not > be used to execute multiple SELECT statements and while it will > execute the statements without any problem, it will return the > wrong value. > > This appears to be the case as well for INSERT...RETURNING as in the > example below. This has always been the case with any statement returning tuples. executemany() *is not* for gathering multiple result sets. federico -- Federico Di Gregorio http://people.initd.org/fog Debian GNU/Linux Developer [email protected] INIT.D Developer fog-NGVKUo/i/[email protected] Degli altri, della gente senza domande, si puo' fare a meno. -- macchinavapore _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkmrlCgACgkQvcCgrgZGjetAXQCcCl8SAUTptgjX+zbYrK2OsXYa YLsAoJPN6Mf26Hdc/B4UKvhffDXJehJe =Zkhd -----END PGP SIGNATURE-----