Thread: foreign key validation error message

foreign key validation error message

From
Markus Bertheau
Date:
Hi,

I just got the following on 7.4:

oocms=3D# delete from objects where object_id =3D 3993;
ERROR:  update or delete on "objects" violates foreign key constraint "$1" =
on "object_as_xml"
DETAIL:  Key (object_id)=3D(3993) is still referenced from table "object_as=
_xml".

So, there you go:

oocms=3D# delete from object_as_xml where object_id =3D 3993;
ERROR:  =D1=81=D0=B2=D1=8F=D0=B7=D1=8C "object_as_xml" =D0=BD=D0=B5 =D1=81=
=D1=83=D1=89=D0=B5=D1=81=D1=82=D0=B2=D1=83=D0=B5=D1=82

(relation "object_as_xml" does not exist)

object_as_xml is in a schema that's not in the search path. The error
message for the foreign key violation should include the schema of the
involved relation.

--=20
Markus Bertheau <twanger@bluetwanger.de>