On Oct 25, 2007, at 10:12 AM, Jean-Paul Calderone wrote: > On Thu, 25 Oct 2007 09:46:54 -0500, Erik Jones <[EMAIL PROTECTED]> > wrote: >> >> [snip] >> >> Fortunately, in his case, that's not necessarily true. If they do >> all their work with the same connection then, yes, but there are >> other problems with that as mention wrt thread safety and psycopg2. >> If he goes the recommended route with a separate connection for each >> thread, then Postgres will not serialize multiple inserts coming from >> separate connections unless there is something like and ALTER TABLE >> or REINDEX concurrently happening on the table. The whole serialized >> inserts thing is strictly something popularized by MySQL and is by no >> means necessary or standard (as with a lot of MySQL). > > PostgreSQL won't serialize inserts to the same table with a sequence > column? Wow. :)
No, because sequences are separate relations that are transaction- safe, which is Postgres multi-process/session version of thread safe. To be more specific, there's really no such thing as a "sequence column" in Postgres. I wan't go into more detail here since this is a Python list, but if you want more info check out the Postges site and manual, the mailing lists, or respond directly to me if you just want to know how this particular bit works better. Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com -- http://mail.python.org/mailman/listinfo/python-list