Referential Integrity Violation not triggered

Started by Keary Suskaover 24 years ago2 messagesgeneral
Jump to latest
#1Keary Suska
hierophant@pcisys.net

I transferred a db from one machine (pg 7.0.3) to another machine (7.1.3),
by dumping data only as proper insert strings, and on the new system
creating the database and schema. When uploading the data to the new clean
database, the data for table "A" failed to insert due to an additional
column that was not in the schema. The funny part is, that 90% of the other
tables refer to this table as a foreign key, but all of the data for those
tables inserted without a referential integrity violation. I thought maybe
the foreign key checks didn't enable for some reason, but I tested with
bogus inserts and everything seems to be working as expected.

Is this an "undocumented feature"?

Also, is there a way to have postgres show the installed triggers?

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Keary Suska (#1)
Re: Referential Integrity Violation not triggered

On Mon, 22 Oct 2001, Keary Suska wrote:

I transferred a db from one machine (pg 7.0.3) to another machine (7.1.3),
by dumping data only as proper insert strings, and on the new system
creating the database and schema. When uploading the data to the new clean
database, the data for table "A" failed to insert due to an additional
column that was not in the schema. The funny part is, that 90% of the other
tables refer to this table as a foreign key, but all of the data for those
tables inserted without a referential integrity violation. I thought maybe
the foreign key checks didn't enable for some reason, but I tested with
bogus inserts and everything seems to be working as expected.

Is this an "undocumented feature"?

Data only dumps disable triggers. That should be mentioned in the pg_dump
documentation (it is now, I'm not sure when it was added)