Re: patch - Report the schema along table name in a referential failure error message - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch - Report the schema along table name in a referential failure error message
Date
Msg-id 19906.1258302117@sss.pgh.pa.us
Whole thread Raw
In response to patch - Report the schema along table name in a referential failure error message  (George Gensure <werkt0@gmail.com>)
Responses Re: patch - Report the schema along table name in a referential failure error message
Re: patch - Report the schema along table name in a referential failure error message
List pgsql-hackers
George Gensure <werkt0@gmail.com> writes:
> I've put together a small patch to provide a schema name in an fk
> violation in deference to the todo item "Report the schema along table
> name in a referential failure error message"

This is not the way forward; if it were, we would have done it years
ago.  Despite the poor wording of the TODO item, nobody is particularly
interested in solving this problem one error message at a time.
Furthermore, inserting the schema name into the text as you have done it
is 100% wrong --- in an example like... table "non_searched_schema.fknsref" violates ...
the reader could be excused for thinking that the report is showing
an unqualified name that happens to include a dot, because that's
what double quotes imply in SQL.  And it certainly does not help
client-side tools that want to extract the full table name, which
is the real subtext behind many of the requests for this.

The direction that we really want to move in is to include the table and
schema names as well as other elements of the standard "diagnostics
area" as separate fields in error reports.  That will be a great deal
of work unfortunately :-( which is why it hasn't been tackled yet.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alex
Date:
Subject: Re: Listen / Notify rewrite
Next
From: Heikki Linnakangas
Date:
Subject: Re: Summary and Plan for Hot Standby