Re: Postgres offset and limit bug

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Postgres offset and limit bug
Дата
Msg-id CAApHDvoDjb0-V2KHWTC5Zz3UJmP8iRaquUHdCqrsD6At5nNFBw@mail.gmail.com
обсуждение исходный текст
Ответ на Postgres offset and limit bug  (Ming <ming@cleanstormwater.com.au>)
Ответы Re: Postgres offset and limit bug  (Ming <ming@cleanstormwater.com.au>)
Список pgsql-bugs
On Thu, 8 Sept 2022 at 20:49, Ming <ming@cleanstormwater.com.au> wrote:
> The issue is when I have limit 1 with the offset, the first record id will be 45 (which should be 46) . (Although,
it’sordered by path, the of is actually ordered as well.) But without the limit 1 the results will be correct. And when
Iplus one to the offset value, the actual offset will increase by 2. 
>
> In general, the offset value with 45 is behave as offset 44. But when change the value to other thing, the results
willbe all good. 

That's probably because the path for 45 and 46 are the same and you've
only specified that you want the results ordered by path. If there are
duplicates then the order that duplicates appear in will be
non-deterministic. Maybe you'll want to consider adding
source_template_id to the ORDER BY.

David



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

Предыдущее
От: Ming
Дата:
Сообщение: Re: Postgres offset and limit bug
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17610: Use of multiple composite types incompatible with record-typed function parameter