Re: RLS creates inaccurate limit and offset results

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: RLS creates inaccurate limit and offset results
Дата
Msg-id 182B8CBD-3A96-434F-A4BF-6270DA11A44D@thebuild.com
обсуждение исходный текст
Ответ на Re: RLS creates inaccurate limit and offset results  (mike@mikebrancato.com)
Список pgsql-bugs

> On Nov 11, 2025, at 14:46, mike@mikebrancato.com wrote:
> If I understand the documentation (https://www.postgresql.org/docs/current/queries-limit.html), inconsistent results
fordifferent LIMIT / OFFSET values is only a known issue when selecting different subsets of data. 

The documentation could perhaps be better worded, but PostgreSQL makes no guarantee of the order of a result set in
absenceof an ORDER BY clause over that particular result set.  Since the ordering can't be guaranteed, which particular
subsetyou get from LIMIT and OFFSET is not guaranteed either. 

Again, this has nothing to do with RLS in particular.  The more complex the query and the more steps a result set has
togo through from disk ordering to result set ordering, the more likely it is to see inconsistent results, but it's
neverguaranteed in any case. 


В списке pgsql-bugs по дате отправления: