From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: Current transaction is aborted, commands ignored until end of transaction block
Date: 1 Jan 2012 20:27:08 GMT
Message-ID: <jdqfis$4kr$2@reversiblemaps.ath.cx> (raw)
References: <4EFD3D32.9060902@greenpeace.org>
On 2011-12-30, Jan Bakuwel <jan.bakuwel@greenpeace.org> wrote:
> This is a cryptographically signed message in MIME format.
>
> What annoys me is that I don't think that a constraint violation made by
> a user should result in an aborted transaction. There is probably a very
> good reason to do that however the logic escapes me...
the reason for it is it allows several updates (or other DML) to be
run without checking for success and then success only checked at the
commit stage. this makes it easier to the DBA to enforce databse
consistancy against wayward applications and not suffer from partial
inserts.
> Of course I can start testing existing values in the database before
> accepting them in the user interface but that's putting the horse behind
> the cart. I much rather use the constraints at the database level to
> tell me a particular update can't be done and do that without loosing
> everything else I happened to have done in that transaction until that
> point.
>
> Any suggestions?
checkpoints can probably do what you want, but long-lived transactions
are a bad idea in general, especially if you expect to have several
physical users accessing your database simultaneously.
--
⚂⚃ 100% natural
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jasen@xnet.co.nz
Subject: Re: Current transaction is aborted, commands ignored until end of transaction block
In-Reply-To: <jdqfis$4kr$2@reversiblemaps.ath.cx>
* 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