A little help with transactions, please

From: Richard Lough <ralough(dot)ced(at)dnet(dot)co(dot)uk>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: A little help with transactions, please
Date: 2003-12-03 12:16:44
Message-ID: 3FCDD42C.BABC5EC@dnet.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,

This is my first attempt at transactions, and I seem to be missing
something. Briefly, the transaction is this

BEGIN;
UPDATE table A;
UPDATE table B;
COMMIT;

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
something?

TIA

Richard A Lough

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-12-03 15:36:48 Re: solaris9 make failure...libpgport.a
Previous Message Michael Glaesemann 2003-12-03 11:26:59 OT: Re: Environment variables SOLVED