On Wed, Dec 03, 2003 at 12:16:44 +0000,
Richard Lough <ralough(dot)ced(at)dnet(dot)co(dot)uk> wrote:
> Hi all,
> This is my first attempt at transactions, and I seem to be missing
> something. Briefly, the transaction is this
> UPDATE table A;
> UPDATE table B;
> I find that the update to table A attempts to produce a duplicate
> primary primary key, and synchronisation with the server is lost.
> The update to table B then proceeds without the benefit of the
> option to rollback the transaction. This seems wrong to me.
> I need both updates completed or neither. Have I missed
I don't think it is normal for failed update statements to cause loss
of synchronization with the server. That can happen with copy statements
(though I think the new protocol available with 7.4 prevents this).
The second update statement should fail since you will be in an aborted
transaction. (Currently there isn't a way for an application to handle
errors and allow the transaction to continue after a failure.)
In response to
pgsql-novice by date
|Next:||From: Bret Busby||Date: 2003-12-10 19:43:31|
|Subject: Re: [NOVICE] PostgreSQL Training|
|Previous:||From: Bruno Wolff III||Date: 2003-12-10 19:31:34|
|Subject: Re: relationship/table design question|