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-20 13:46:33
Message-ID: fd50d228bf110ed0e014257f563f0ad9@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

Simon Riggs wrote:
> So it would be useful to have a non-default option of
> statement-level abort for those cases, as an ease of use feature.
^^^^^^^^^^^^^^^^^^^^
I think you misspelled "foot gun"

Chris Travers wrote:

> Most interactions with a database are not occurring over an interface
> like psql with one person typing on one side and the db executing on
> the other. If that were the case I would understand the concern
> that a typo should give the user an opportunity to pick up the
> statement where he/she left off.

Well, that's really up to the users/authors of other tools, if they
feel the need to scratch that itch.

> I guess it seems to me that I would not object to a new option for
> transaction behavior where one could do something like SET TRANSACTION
> INTERACTIVE; and have no errors abort the transaction at all (explicit
> commit or rollback required) but I would complain loudly if this were
> to be the default, and I don't see a real need for it.

I would object. That's a recipe for disaster, and goes against our
philosophy of being safe, careful, and correct.

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

iEYEAREDAAYFAk/h1BQACgkQvJuQZxSWSshZ6QCfaGG1y0d76aTMKiXTU8Gy8i2G
MjUAnAiAbf53qL3MOXUEiqKARhm2mezx
=wbJw
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Little, Douglas 2012-06-20 13:56:04 error handling
Previous Message felix 2012-06-20 13:36:09 Re: Feature discussion: Should syntax errors abort a transaction?