| От | Tom Lane |
|---|---|
| Тема | Re: How to select and result row number?? |
| Дата | |
| Msg-id | 12283.1032302624@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: How to select and result row number?? (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-sql |
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> Say what? Given the ORDER BY in the subselect, it will.
> When you specify a table in FROM, there is no ordering to the table. Is
> it guaranteed that a subquery in FROM _does_ have an ordering.
If you write ORDER BY, we'll implement it.
> Does ANSI say it has an ordering?
ANSI forbids ORDER BY in sub-selects, so they don't have to address the
question.
> What if the subquery is involved in a join?
We are entitled to reorder its output for purposes of processing the
join, then. But that's entirely irrelevant to the example as given.
There is no reason to reorder the subselect output, and we won't.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера