| От | Tom Lane |
|---|---|
| Тема | Re: Bypassing useless ORDER BY in a VIEW |
| Дата | |
| Msg-id | 16851.1204235535@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Bypassing useless ORDER BY in a VIEW ("Dean Gibson (DB Administrator)" <postgresql@ultimeth.com>) |
| Список | pgsql-performance |
"Dean Gibson (DB Administrator)" <postgresql@ultimeth.com> writes:
> Of course, where ORDER BY in a VIEW is really helpful, is with OFFSET
> and/or LIMIT clauses (which are also PostgreSQL extensions), which is
> equivalent to what you point out.
Right, which is the main reason why we allow it. I think that these
are sort of poor man's cases of things that SQL2003 covers with
"windowing functions".
The SQL spec treats ORDER BY as a cosmetic thing that you can slap onto
the final output of a SELECT. They don't consider it useful in
subqueries (including views) because row ordering is never supposed to
be a semantically significant aspect of a set of rows.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера