Re: Allow an alias to be attached directly to a JOIN ... USING

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: Allow an alias to be attached directly to a JOIN ... USING
Дата
Msg-id
9a5c9ed2-1dd7-8c2a-6b90-0de54f4c13a1@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Fabien COELHO <coelho@cri.ensmp.fr>
Re: Allow an alias to be attached directly to a JOIN ... USING Thomas Munro <thomas.munro@gmail.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Fabien COELHO <coelho@cri.ensmp.fr>
Re: Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Vik Fearing <vik.fearing@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Wolfgang Walther <walther@technowledgy.de>
Re: Allow an alias to be attached directly to a JOIN ... USING Georgios Kokolatos <gkokolatos@protonmail.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Daniel Gustafsson <daniel@yesql.se>
Re: Allow an alias to be attached directly to a JOIN ... USING Fabien COELHO <coelho@cri.ensmp.fr>
Re: Allow an alias to be attached directly to a JOIN ... USING Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Allow an alias to be attached directly to a JOIN ... USING Thomas Munro <thomas.munro@gmail.com>
On 2019-12-24 19:13, Fabien COELHO 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,
> 
>       https://www.postgresql.org/message-id/flat/2aa57950-b1d7-e9b6-0770-fa592d565dda@2ndquadrant.com
> 
> the patch does not conform to spec
> 
>     SQL:2016 Part 2 Foundation Section 7.10 
> 
> 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.

I took another crack at this.  Attached is a new patch that addresses 
the semantic comments from this and the other thread.  It's all a bit 
tricky, comments welcome.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Robert Treat
Дата:
От: Tomas Vondra
Дата:
FAQ