pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sebastien Flaesch <sebastien.flaesch@4js.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Transaction and SQL errors
Date: Tue, 12 Apr 2022 09:48:38 +0000
Message-ID: <DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAKFQuwZaMwHsQ3Ev5wcfXfBgb+H-DQmJcTGztHy+t6TOriu48Q@mail.gmail.com>
References: <DBAP191MB1289450C733A5A3662C2257EB0E59@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<CAApHDvpz8HohzRpPq3OPkyS3=wV2aQPmE72O3i5D5RbVXehSzA@mail.gmail.com>
	<DBAP191MB128948A1A03136C661483EBAB0E59@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
	<CAKFQuwZaMwHsQ3Ev5wcfXfBgb+H-DQmJcTGztHy+t6TOriu48Q@mail.gmail.com>

Hello,

Back on this "feature", I did some experiments by changing the code of our PostgreSQL driver (db connector)...

We have our own programming language and VM/runtime.

With a config setting (I don't want to enable this by default), our driver now automatically adds a SAVEPOINT before any SQL statement executed in a transaction block, and issues an automatic ROLLBACK TO SAVEPOINT in case of SQL error, or RELEASE SAVEPOINT, if not SQL error occurred (I think last one is useless, but I prefer to cleanup)

view thread (11+ messages)

Message-ID: <DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
Permalink:  ../DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sebastien.flaesch@4js.com, david.g.johnston@gmail.com, dgrowleyml@gmail.com
  Subject: Re: Transaction and SQL errors
  In-Reply-To: <DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>
  References: <DBAP191MB1289450C733A5A3662C2257EB0E59@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <CAApHDvpz8HohzRpPq3OPkyS3=wV2aQPmE72O3i5D5RbVXehSzA@mail.gmail.com> <DBAP191MB128948A1A03136C661483EBAB0E59@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM> <CAKFQuwZaMwHsQ3Ev5wcfXfBgb+H-DQmJcTGztHy+t6TOriu48Q@mail.gmail.com> <DBAP191MB1289A69A3F15AE7148B388CFB0ED9@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox