Re: Re: "Oracle's ROWNUM"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: "Oracle's ROWNUM"
Дата
Msg-id 21527.996516732@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: "Oracle's ROWNUM"  (Barry Lind <barry@xythos.com>)
Список pgsql-general
Barry Lind <barry@xythos.com> writes:
> ...  For example rownum = 2 will return
> no rows because the first row returned by the query has by definition a
> rownum of 1, but the where predicate prevents this row from being
> returned, thus it can never get to a rownum value of 2 to satisfy the
> where predicate.

So in other words, a construct accessible in the WHERE clause is defined
in terms of what happens far downstream of WHERE.  This cannot possibly
have sane behavior.  I won't even ask about join queries...

AFAICT, LIMIT/OFFSET do the same job in a much more logical fashion.
Let's stick with those, and not try to copy the more brain-dead aspects
of Oracle.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: RULE vs TRIGGER
Следующее
От: Peter Choe
Дата:
Сообщение: database information