Re: REFERENCES error message complaint, suggestion - Mailing list pgsql-general

From Greg Stark
Subject Re: REFERENCES error message complaint, suggestion
Date
Msg-id 87llmg8aki.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: REFERENCES error message complaint, suggestion  (Greg Stark <gsstark@mit.edu>)
Responses Re: REFERENCES error message complaint, suggestion
List pgsql-general
Greg Stark <gsstark@MIT.EDU> writes:

> It's great to know which constraint was violated but that doesn't really help
> you figure out *why* it was violated.

On further thought it would never be feasible to do what the other poster is
really looking for. At least for table constraints it would require poking
through the expression to determine which columns might have caused the
violation.

Perhaps a better idea would be a debugging log message that dumped the entire
contents of a row update or insertion that fails due to any constraint. That
would be disabled normally but easy to enable and produce information that
would be very helpful for a dba loading data or doing large updates.

Especially if there's an option to complete the operation producing all the
errors before forcing the rollingback of the transaction.

--
greg

pgsql-general by date:

Previous
From: phil campaigne
Date:
Subject: Setting up Postgresql on Linux
Next
From: Tom Lane
Date:
Subject: Re: Setting up Postgresql on Linux