Re: is it possibile get the psql prompt output? - Mailing list psycopg

From Egbert Bouwman
Subject Re: is it possibile get the psql prompt output?
Date
Msg-id 20120516101749.271a3d87@para.lan
Whole thread Raw
In response to is it possibile get the psql prompt output?  (Ottavio Campana <ottavio@campana.vi.it>)
List 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 by date:

Previous
From: Federico Di Gregorio
Date:
Subject: Re: is it possibile get the psql prompt output?
Next
From: Kryklia Alex
Date:
Subject: Question aboud #80 - itersize in cursor dic