Re: is it possibile get the psql prompt output?

From: Egbert Bouwman <egbert(dot)bouwman(at)xs4all(dot)nl>
To: psycopg(at)postgresql(dot)org
Subject: Re: is it possibile get the psql prompt output?
Date: 2012-05-16 08:17:49
Message-ID: 20120516101749.271a3d87@para.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, 16 May 2012 09:06:56 +0200
Ottavio Campana <ottavio(at)campana(dot)vi(dot)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

In response to

Browse psycopg by date

  From Date Subject
Next Message Kryklia Alex 2012-05-16 09:22:25 Question aboud #80 - itersize in cursor dic
Previous Message Federico Di Gregorio 2012-05-16 07:24:18 Re: is it possibile get the psql prompt output?