Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group