Strange Behaviour in Zope 2.10/PG9 - Mailing list psycopg

From Richard Harley
Subject Strange Behaviour in Zope 2.10/PG9
Date
Msg-id 76e8ea241b32da8fe4da0a6751b25fef@scholarpack.com
Whole thread Raw
List psycopg

Hi all

Using Psycopg2 in a Centos 6 / Zope 2.10 / Postgres 9 setup but getting some strange behaviour after upgrading from Psycopg1/PG8.

In a python script if I run two methods that interact with the db one after the other like this:

context.insertteachers(firstname=firstname,surname=surname,name=name,title=title)
teacherid = context.getlatestid()[0][0]

..the insert doesn't work.

If I comment out the second line so there is only one method, the insert works. Any form of db interaction after the insert causes it to not insert.

In Psycopg 1 I don't have this problem - I can insert then select within one python script. If I can't find the solution to these it's going to make it almost impossible to upgrade
because we use this everywhere in our application i.e. inserts, then selects, then maybe more inserts all within one script.

Any ideas?
Thanks
Rich

 

psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Change in datetime type casting
Next
From: Federico Di Gregorio
Date:
Subject: Re: Change in datetime type casting