one or 2 transactions? - Mailing list pgsql-novice

From Jean-Yves F. Barbier
Subject one or 2 transactions?
Date
Msg-id 4B2146FA.3060108@gmail.com
Whole thread Raw
Responses Re: one or 2 transactions?  (Andreas Kretschmer <akretschmer@spamfence.net>)
List 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

pgsql-novice by date:

Previous
From: Brian Modra
Date:
Subject: Re: Is autovaccum lazy?
Next
From: Andreas Kretschmer
Date:
Subject: Re: one or 2 transactions?