Hi Peter,
IMHO, Evgenij is 100% correct. This is NOT a bug.

If something (like offset pagination) is not uncommon, it does not make it 
the best practice.
If PostgressSQL always yields some deterministic behaviour, where 
non-determinism is allowed by SQL standard (and common sence),
 it does not mean that any other RDBMS should behave similarly.

I would follow Evgenij's advice and organize pagination on some unique 
attribute(s), and without OFFSET, but with adjustable WHERE condition, 
instead.
It would also cover cases of concurrent inserts / deletes (messing up all 
offsets), during your pages traversal.


On Saturday, April 13, 2024 at 11:34:54 AM UTC-4 Peter Borissow wrote:

> Thanks Evgeni, as always, for your prompt response! 
>
> So you don't think this is a bug? Pagination using offset and limit is not 
> uncommon. 
>
> Also, I should have mentioned this earlier but I don't see this behavior 
> in PostgreSQL. Not sure how other RDBMS behave but it would be interesting 
> to compare.
>
> Peter
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/b0d4ff10-37a3-4181-aad6-aa9b10e598a0n%40googlegroups.com.

Reply via email to