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

From: George Gensure <werkt0(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch - Report the schema along table name in a referential failure error message
Date: 2009-11-15 18:09:56
Message-ID: b47db0340911151009s26aed4a7l5e98de0904d12d8f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 15, 2009 at 11:21 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> George Gensure <werkt0(at)gmail(dot)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
>

Fair enough, and I hadn't even considered that dots could be valid
chars in table names. I noted your post in the chain attached to this
todo request in which you said this is a much bigger problem, but
didn't think that you would have left it marked as easy if you thought
there should be something done that makes the original error string
modification pointless.

This begs a bigger question: what's *really* easy or low barrier to
entry for very light contributors like myself? - I've got time, I like
the product, I need to know what's going to get you a win, I may not
be gunning particularly for the feature myself. Its fascinating that
this item also included a mention of straw polling in its thread.

Thanks,
-George

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-11-15 18:15:06 Re: Summary and Plan for Hot Standby
Previous Message Pavel Stehule 2009-11-15 18:08:04 Re: actualised funcs typmod patch