| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Allow an alias to be attached directly to a JOIN ... USING | 
| Date: | 2019-12-24 18:13:32 | 
| Message-ID: | alpine.DEB.2.21.1912241908490.27864@pseudo | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, 17 Sep 2019, Alvaro Herrera wrote:
>> Indeed, that seems like a problem, and it's a good question.  You can
>> see this on unpatched master with SELECT x.filler FROM
>> (pgbench_tellers AS t JOIN b USING (bid)) AS x.
>
> I'm not sure I understand why that problem is a blocker for this patch.
As discussed on another thread,
the patch does not conform to spec
SQL:2016 Part 2 Foundation Section 7.10 <joined table>
Basically "x" is expected to include *ONLY* joined attributes with USING, 
i.e. above only x.bid should exists, and per-table aliases are expected to 
still work for other attributes.
ISTM that this patch could be "returned with feedback".
-- 
Fabien.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2019-12-24 19:57:39 | Re: mdclose() does not cope w/ FileClose() failure | 
| Previous Message | Tom Lane | 2019-12-24 17:42:11 | Re: unsupportable composite type partition keys |