Re: Feature discussion: Should syntax errors abort a transaction?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Feature discussion: Should syntax errors abort a transaction?
Date: 2012-06-19 15:49:39
Message-ID: fb632c3877658162ade7d7ec050d0636@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

...
> ON_ERROR_ROLLBACK=interactive provides a helper for that in psql.
>
> Savepoints are overhead, though, and I don't understand why they're
> required for statements that don't even parse.

Other have handled the latter part of the above already (short version:
error is the only sane response to a non-parsing statement), but as
to the first part, the overhead is really not that high. Yes, psql
will create and remove a savepoint around each statement, but this is
a very lightweight action, especially if you are using psql in
interactive mode. In other words, we already have an elegant and
lightweight approach to the described problem.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201206191146
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk/gn30ACgkQvJuQZxSWSsgekgCfcoBq2VjCitjrpK9CrSMFob0Y
YF8An3Qp/OQjAcRsEBahE5OIbFzEEZX/
=hHAn
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Rostron 2012-06-19 16:29:19 db server processes hanging around
Previous Message Edson Richter 2012-06-19 14:50:49 Re: Feature discussion: Should syntax errors abort a transaction?