Re: Windowing Function Patch Review -> Standard Conformance

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Windowing Function Patch Review -> Standard Conformance
Дата
Msg-id 0E8DD1BFEC6A4452A0518325498D66D5@amd64
обсуждение исходный текст
Ответ на Re: Windowing Function Patch Review -> Standard Conformance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane Wrote:
> Actually, it's not ambiguous according to our interpretation of ORDER BY
> clauses: the first attempt is to match an output column name, so it's
> seizing on the first SELECT column (b.parentpart) as being the intended
> sort key for "parentpart", and similarly for "childpart".  You'd get the
> same thing if you did "ORDER BY 1,2".
>

Aha, I see. Well I learned something new tonight. I didn't realise that
Postgres would be that intelligent about it. It makes total sense. I
probably should have known this, but I'll forgive myself as I'm one of these
people that will prefix all column names when joining in case I ever add new
conflicting columns. <end of excuse>

> We could disable all those special rules for window cases, but then we'd
> have to document how window ORDER BY is different from query ORDER BY,
> etc.  I think it'd be more confusing not less so.
>

Without any further thought, I vote to leave it how it is.

David.





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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: new libpq SSL connection option
Следующее
От: Andrew Dunstan
Дата:
Сообщение: parallel restore