Re: is it possibile get the psql prompt output?

Поиск
Список
Период
Сортировка
От Egbert Bouwman
Тема Re: is it possibile get the psql prompt output?
Дата
Msg-id 20120516101749.271a3d87@para.lan
обсуждение исходный текст
Ответ на is it possibile get the psql prompt output?  (Ottavio Campana <ottavio@campana.vi.it>)
Список psycopg
On Wed, 16 May 2012 09:06:56 +0200
Ottavio Campana <ottavio@campana.vi.it> wrote:

>
> and that you perform this command in psql
>
> mydb=# INSERT INTO xxx_test values (default, 'ciao');
> INSERT 0 1
> mydb=#
>
> In python I do
>
> cursor = connection.cursor ()
> cursor.execute (command)
> connection.commit ()
>
> with command being the insert command. Now the question is: is there
> a way to get the "INSERT 01" back?
>

Is this what you are looking for :
cursor.execute(command)
cursor.statusmessage


e

--
Egbert Bouwman

В списке psycopg по дате отправления:

Предыдущее
От: Federico Di Gregorio
Дата:
Сообщение: Re: is it possibile get the psql prompt output?
Следующее
От: Kryklia Alex
Дата:
Сообщение: Question aboud #80 - itersize in cursor dic