Strange Behaviour in Zope 2.10/PG9

From: Richard Harley <richard(at)scholarpack(dot)com>
To: <psycopg(at)postgresql(dot)org>
Subject: Strange Behaviour in Zope 2.10/PG9
Date: 2012-07-01 16:05:06
Message-ID: 76e8ea241b32da8fe4da0a6751b25fef@scholarpack.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse psycopg by date

  From Date Subject
Next Message Federico Di Gregorio 2012-07-02 08:24:44 Re: Change in datetime type casting
Previous Message Adrian Klaver 2012-06-30 00:02:09 Re: Change in datetime type casting