Re: How to implement oracle like rownum(function or seudocolumn)

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: How to implement oracle like rownum(function or seudocolumn)
Дата
Msg-id 20060408220736.GA19392@fetter.org
обсуждение исходный текст
Ответ на Re: How to implement oracle like rownum(function or seudocolumn)  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: How to implement oracle like rownum(function or seudocolumn)  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Список pgsql-hackers
On Sat, Apr 08, 2006 at 02:02:53PM -0400, Jan Wieck wrote:
> Someone correct me if I'm wrong, but I was allways under the impression 
> that Oracle's ROWNUM is a thing attached to a row in the final result 
> set, whatever (possibly random) order that happens to have. Now a) this 
> is something that IMHO belongs into the client or stored procedure code, 
> b) if I am right, the code below will break as soon as an ORDER BY is 
> added to the query and most importantly c) if a) cannot do the job, it 
> indicates that the database schema or business process definition lacks 
> some key/referential definition and is in need of a fix.
> 
> My humble guess is that c) is also the reason why the ANSI didn't find a 
> ROWNUM desirable.

Sadly, ANSI did just that.

http://troels.arvin.dk/db/rdbms/#select-limit
http://troels.arvin.dk/db/rdbms/#select-top-n
http://troels.arvin.dk/db/rdbms/#select-limit-offset

Cheers,
D
-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Support Parallel Query Execution in Executor
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Support Parallel Query Execution in Executor