Strange limit and offset behaviour....

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: Strange limit and offset behaviour....
Date: 2009-02-07 21:29:13
Message-ID: 20090207222913.318dba86@pennywise.havleik.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the following sql:

SELECT * from table order by dato asc limit 20 offset 0

This gives me different rows than the 20 first rows when running the following sql:

SELECT * from table order by dato asc

Shouldn't the 20 first rows in the second sql statment be the same 20 rows that is returned in the first statement
or am I missing something?

Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj(at)havleik(dot)no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Rich 2009-02-07 21:49:49 Re: Strange limit and offset behaviour....
Previous Message Bruce Momjian 2009-02-07 17:14:37 Re: encoding of PostgreSQL messages