Re: New CORRESPONDING clause design

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Surafel Temesgen <surafel3000(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New CORRESPONDING clause design
Date: 2017-03-18 18:22:28
Message-ID: CAFj8pRCG3PcK3BpPgnHKX613jrZvMhE2CaP30i7auKKzyYCmvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-03-18 19:12 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > 2017-03-18 18:32 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> >> 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.
>
> > I had a idea use own node for CORRESPONDING with location - and using
> this
> > location in related error messages.
>
> I think using a private node type for CORRESPONDING is exactly the wrong
> thing. It's a columnList and it should be like other columnLists. If
> there's an argument for providing a location for "no such column" errors
> for CORRESPONDING, then surely there's also an argument for providing
> a location for "no such column" errors for FOREIGN KEY and the other
> places where we have lists of column names.
>

The corresponding clause is used in UNION queries - these queries can be
pretty long, so marking wrong corresponding clause can be helpful.

Probably there are not any other argument for special node,

Regards

Pavel

>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-03-18 18:30:01 Re: PoC plpgsql - possibility to force custom or generic plan
Previous Message Tom Lane 2017-03-18 18:12:31 Re: New CORRESPONDING clause design