No, but instead always do an implicit COMMIT after each statement, like
SELECT 1; SELECT 2; (not \;) in psql.
The PostgreSQL document even states that 'Issuing COMMIT when not inside a
transaction does no harm, but it will provoke a warning message.' for a
long time,
but in fact it have side-effect when used in an implicit transactions.
If we can ensure that the COMMIT/ROLLBACK really does nothing, we don't
have to distinguish CHAIN and NO CHAIN errors anymore.

2019年9月8日(日) 2:04 Fabien COELHO <coe...@cri.ensmp.fr>:

>
> >> Now, I'd prefer error in all cases, no doubt about that, which might be
> >> considered a regression. A way around that could be to have a GUC decide
> >> between a strict behavior (error) and the old behavior (warning).
> >
> > I think it's more better to have a GUC to disable implicit transaction
> > 'block' feature, because that's probably the root of all issues.
>
> Hmmm… I'm not sure that erroring out on "SELECT 1" because there is no
> explicit "BEGIN" is sellable, even under some GUC.
>
> --
> Fabien.

Reply via email to