Re: [HACKERS] New CORRESPONDING clause design - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] New CORRESPONDING clause design
Date
Msg-id 4968.1489858326@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] New CORRESPONDING clause design  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] New CORRESPONDING clause design  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2017-03-18 17:50 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
>> I'm not impressed by using A_Const for the members of the CORRESPONDING
>> name list.  That's not a clever solution, that's a confusing kluge,
>> because it's a complete violation of the meaning of A_Const.  Elsewhere
>> we just use lists of String for name lists, and that seems sufficient
>> here.  Personally I'd just use the existing columnList production rather
>> than rolling your own.

> The reason was attach a location to name for more descriptive error
> message.

[ shrug... ] The patch fails to actually use the location anywhere.
If it had, you might have noticed that it's attaching the wrong location
to all elements except the first :-(.  So I'm not very excited about that.
I definitely don't see a reason for CORRESPONDING to track locations of
name list elements when no other name list productions do.  It might be
worth proposing a followon patch to change all of them (perhaps by adding
a location field to struct "Value") and then make use of the locations in
error messages more widely.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Mithun Cy
Date:
Subject: Re: [HACKERS] [POC] A better way to expand hash indexes.
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] New CORRESPONDING clause design