Strange Behaviour in Zope 2.10/PG9

Поиск
Список
Период
Сортировка
От Richard Harley
Тема Strange Behaviour in Zope 2.10/PG9
Дата
Msg-id 76e8ea241b32da8fe4da0a6751b25fef@scholarpack.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Change in datetime type casting
Следующее
От: Federico Di Gregorio
Дата:
Сообщение: Re: Change in datetime type casting