Re: Better error message for select_common_type() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Better error message for select_common_type()
Date
Msg-id 16140.1177369350@sss.pgh.pa.us
Whole thread Raw
In response to Re: Better error message for select_common_type()  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Better error message for select_common_type()  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Better error message for select_common_type()  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> +1 on using the parser location mechanism and avoiding the
>> terminology problem altogether.

> I figured we would let the parser only point to the UNION or VALUES or 
> whatever word.  It would be fairly cumbersome to drag the individual 
> expression positions down into select_common_value() for full 
> precision.

Possibly.  I was thinking of demanding that callers pass an additional
list containing positions for the expressions, but hadn't looked to see
how easy that might be.  In any case, if we need to point at both
expressions then it's not gonna work.

For the VALUES case, the suggestion of "row" and "column" terminology
seems the right thing, but for UNION it would be better to use "branch"
perhaps ("row" certainly seems misleading).  How can we make that work
without indulging in untranslatable keyword-insertion?

Another possibility is "alternative" and "column", which seems like it
applies more or less equally poorly to both cases.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Improving deadlock error messages
Next
From: Alvaro Herrera
Date:
Subject: Re: Better error message for select_common_type()