Re: Recursive FOREIGN KEY?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Stump <joe(at)joestump(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recursive FOREIGN KEY?
Date: 2004-04-04 05:44:13
Message-ID: 21164.1081057453@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Stump <joe(at)joestump(dot)net> writes:
> I was getting an error on the parentID reference because there were no
> records to reference in the first place. Odd.

It should work, because the FK check is an end-of-statement check and
should consider the just-inserted row as available for referencing.
What PG version are you using, and can you show the exact sequence of
operations that produces a failure for you?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message joseph speigle 2004-04-04 06:33:49 Re: thread_test.c problems
Previous Message Joe Stump 2004-04-04 04:46:50 Re: Recursive FOREIGN KEY?