one or 2 transactions?

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: one or 2 transactions?
Date: 2009-12-10 19:07:38
Message-ID: 4B2146FA.3060108@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi list,

I've got tables: account & client, creating a client must automatically
create the corresponding account that'll be a foreign key into client.

AFAI read, I must DEFERRABLE INITIALLY DEFERRED the foreign key constraint
into client.

But can I do all this into only one transaction (writing account's row
before client's), or am I obliged to have 2 distinct transactions?

JY
--
"Wish not to seem, but to be, the best."
-- Aeschylus

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2009-12-10 19:34:26 Re: one or 2 transactions?
Previous Message Brian Modra 2009-12-05 13:38:43 Re: Is autovaccum lazy?