Re: Unexpected behaviour of ORDER BY and LIMIT/OFFSET

From: Ognjen Blagojevic <ognjen(at)etf(dot)bg(dot)ac(dot)yu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unexpected behaviour of ORDER BY and LIMIT/OFFSET
Date: 2009-05-14 19:21:47
Message-ID: 4A0C6F4B.4040803@etf.bg.ac.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
> "ORDER BY id_dept" isn't a unique sort key. In this example the
> implementation is free to return Meggie and Marge in either order,
> and the ordering can indeed vary depending on the LIMIT/OFFSET values.
>
> Moral: don't use LIMIT/OFFSET without a fully specified sort order.

Thank you, Tom, for your prompt response.

Regards,
Ognjen

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ognjen Blagojevic 2009-05-14 19:29:20 Re: INSERTING "NEW LINES" IN A SELECT STATEMENT
Previous Message JORGE MALDONADO 2009-05-14 19:03:20 INSERTING "NEW LINES" IN A SELECT STATEMENT