Re: BUG #8629: Strange resultset when using CTE or a subselect - Mailing list pgsql-bugs

From jonathan.camile
Subject Re: BUG #8629: Strange resultset when using CTE or a subselect
Date
Msg-id 1385544379332-5780519.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #8629: Strange resultset when using CTE or a subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi Tom,

Thanks for the answer.
It's clearer now, I might avoid this behavior ordering by id at last.
I still have the impression that is a bit buggy or misleading.
Even with simple query such as :

SELECT c.id
FROM public.testme c
WHERE c.status = ANY ('{5}')
ORDER BY c.status DESC
OFFSET 150
LIMIT 200

the last is always the same but not the penultimate. Even if the ordering is
underdetermined it shouldn't change then LIMIT/OFFSET shouldn't return the
same value for 2 non overlapping ranges.
I find it difficult to understand how it works completely, but my knowledge
are quite limited.

Thanks anyway. :)



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-8629-Strange-resultset-when-using-CTE-or-a-subselect-tp5780187p5780519.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: PQconninfo() doesn't return anything for host=/socket/directory
Next
From: michael.lancaster@exa-networks.co.uk
Date:
Subject: BUG #8633: Assigning to a variable named "current_time" gives wrong output