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

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Allow an alias to be attached directly to a JOIN ... USING
Дата
Msg-id alpine.DEB.2.21.1912241908490.27864@pseudo
обсуждение исходный текст
Ответ на 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  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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,

     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 <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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unsupportable composite type partition keys
Следующее
От: Noah Misch
Дата:
Сообщение: Re: mdclose() does not cope w/ FileClose() failure