Re: Transaction and SQL errors - Mailing list pgsql-general

From David G. Johnston
Subject Re: Transaction and SQL errors
Date
Msg-id CAKFQuwZaMwHsQ3Ev5wcfXfBgb+H-DQmJcTGztHy+t6TOriu48Q@mail.gmail.com
Whole thread Raw
In response to Re: Transaction and SQL errors  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Responses Re: Transaction and SQL errors  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
Re: Transaction and SQL errors  (Sebastien Flaesch <sebastien.flaesch@4js.com>)
List pgsql-general
On Mon, Apr 4, 2022 at 5:41 AM Sebastien Flaesch <sebastien.flaesch@4js.com> wrote:

I know savepoints are supported by PostgreSQL, but what about existing/legacy code that has tons of lines that rely on the behavior of other DB engines?

Would you ask programmers to put a savepoint / release savepoint around each SQL statement inside a TX?


That does have the benefit of being a relatively straight-forward solution.

The answer to your original question is no.  To my knowledge there is presently no one who has broadcast their intent to add this feature, now or in the foreseeable future.

Personally, I can see where it has significant value for psql in interactive mode because people make typos.  Application code doesn't.  That removes a whole class of problems where the feature provides benefit.

Whether "everybody is doing it" overcomes "but it's not a good thing to do" remains to be seen but at least for now we are just saying no to an automatic rollback setting.

David J.

pgsql-general by date:

Previous
From: "J. Roeleveld"
Date:
Subject: Re: Transaction and SQL errors
Next
From: Tom Lane
Date:
Subject: Re: gist segmentation fault