Re: RLS creates inaccurate limit and offset results

Christophe Pettus <xof@thebuild.com>

From: Christophe Pettus <xof@thebuild.com>
To: mike@mikebrancato.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-11-11T22:10:23Z
Lists: pgsql-bugs

> On Nov 11, 2025, at 08:29, mike@mikebrancato.com wrote:
> I have noticed that using row level security can cause use of `LIMIT` and `OFFSET` to return inconsistent results without the use of an explicit `ORDER BY`.

LIMIT and OFFSET without ORDER BY are not guaranteed to return consistent results even without RLS.  RLS may cause it be more obvious, however.