Re: How to select and result row number??

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cannot delete bug
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Returning a reference to a cursor from a function