Re: WITH ORDINALITY versus column definition lists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WITH ORDINALITY versus column definition lists
Дата
Msg-id 21412.1385046666@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WITH ORDINALITY versus column definition lists  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On 20 November 2013 22:46, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Tom> 1. Reinsert HEAD's prohibition against directly combining WITH
>> Tom> ORDINALITY with a coldeflist (with a better error message and a
>> Tom> HINT suggesting that you can get what you want via the TABLE
>> Tom> syntax).
>> 
>> That gets my vote.

> Yeah that seems preferable to option #2, which just seems to open up a
> whole can of worms.

> However, I think I would quickly find it a PITA that it kept telling
> me to wrap it in a TABLE() construct. It would seem like the "TABLE"
> was just an unnecessary noise word (from a user perspective). Could we
> simply support an alias list after the ORDINALITY, in addition to the
> coldeflist?

This seems like way too much complication to save a couple of keystrokes
in a corner case.  Two separate AS clauses applying to the same FROM
item seems mighty confusing to me ...
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PERFORM] Cpu usage 100% on slave. s_lock problem.
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: [PERFORM] Cpu usage 100% on slave. s_lock problem.