Re: Proper way to keep count of statements executed within currenttransaction - Mailing list psycopg

From Christophe Pettus
Subject Re: Proper way to keep count of statements executed within currenttransaction
Date
Msg-id D736EE9B-27AB-42F9-BB04-D0887C758594@thebuild.com
Whole thread Raw
In response to Proper way to keep count of statements executed within current transaction  ("Podrigal, Aron" <aronp@guaranteedplus.com>)
List psycopg

> On May 24, 2019, at 13:49, Podrigal, Aron <aronp@guaranteedplus.com> wrote:
>
> My question is, what is the correct way to detect whether any statements were executed successfully prior to the
connectionbeing lost. 

You can't.  This is exactly why you have transactions: In the case of a lost connection, you can assume the transaction
wasaborted, and retry the transaction from the start. 

--
-- Christophe Pettus
   xof@thebuild.com




psycopg by date:

Previous
From: "Podrigal, Aron"
Date:
Subject: Proper way to keep count of statements executed within current transaction
Next
From: Thomas Güttler
Date:
Subject: Re: Log Stacktrace of current Python Interpreter via PostgreSQLtrigger