Re: Small foreign key error message improvement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small foreign key error message improvement
Date: 2009-07-07 14:28:24
Message-ID: 6140.1246976904@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On Monday 06 July 2009 23:00:18 Tom Lane wrote:
>> It seems to me that the right fix here is not so much to tweak the
>> message wording as to put in an error location cursor. In more
>> complicated cases (eg, multiple FOREIGN KEY clauses) the suggested
>> wording change wouldn't help much anyway.

> It looks like this would involve equipping the Value node with location
> information and passing that around everywhere. This could also be used to
> supply better location information for a number of other cases. Does that
> sound like the right direction?

Yeah, something more or less like that. The trick is to not clutter the
code too much. Perhaps the parser should use an alternate version of
makeString that accepts a location parameter, while leaving existing
calls elsewhere as-is?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-07-07 14:31:14 Re: *_collapse_limit, geqo_threshold
Previous Message Tom Lane 2009-07-07 14:22:06 Re: Reduce the memcpy call from SearchCatCache