Re: Transactions and constraints - Mailing list pgsql-general

From Tom Lane
Subject Re: Transactions and constraints
Date
Msg-id 13823.1022804627@sss.pgh.pa.us
Whole thread Raw
In response to Transactions and constraints  (Emil Eifrem <emil.eifrem@windh.com>)
Responses Re: Transactions and constraints
List pgsql-general
Emil Eifrem <emil.eifrem@windh.com> writes:
> Upon commit, we get the following error message:
> "ERROR:  my_ref referential integrity violation - key referenced from
> table_b not found in table_a"
> We believe this to be valid SQL. We have successfully executed the
> equivalent statements on an Informix Dynamic Server 9.20.

I do not get an error with current sources.  I believe this was fixed
by Stephan Szabo's recent patch:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c.diff?r1=1.32&r2=1.33

I am hesitant to back-patch this in for 7.2.2, however, since it has
received essentially no testing.  (Two things clearly wrong with the
original patch are that it doesn't close pk_rel again, and it neglects
to reset ReferentialIntegritySnapshotOverride before returning.)  But
if you care to apply it locally with those repairs, it may hold you
until 7.3 ...

            regards, tom lane

pgsql-general by date:

Previous
From: Emil Eifrem
Date:
Subject: Transactions and constraints
Next
From: Emil Eifrém
Date:
Subject: Re: Transactions and constraints