Re: BUG #13790: last row of limit/offset result produces duplicates

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #13790: last row of limit/offset result produces duplicates
Дата
Msg-id CAKFQuwatYOTvMuCrZQ3N9z16A9FYoeY5CtRq9XiLwgyhZ4dG_g@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #13790: last row of limit/offset result produces duplicates  (pbelbin@gmail.com)
Список pgsql-bugs
On Wed, Dec 2, 2015 at 2:02 PM, <pbelbin@gmail.com> wrote:

> select * from demo1 order by code limit 5 offset 10
>
> 18;CHCG;240
> 19;CHCG;248
> 20;CHCG;250
> 14;CHCG;224
> 10;CHCG;216
>
> and then:
>
> select * from demo1 order by code limit 5 offset 20
>
> 28;CHCG;289
> 29;CHCG;301
> 30;CHCG;302
> 14;CHCG;224
> 10;CHCG;216
>
>
> the last row of the two result sets above is the same row!
>
> changing the sorting so that it includes the match column appears to avoi=
d
> the issue, but, this is a bug.  each row should only appear once if the
> limit/offset values are looking at different portions of the result that
> would be produced without the limit/offset options
> =E2=80=8B.
>

I'm sorry but no, that is not how this works.  The two queries are
independent and if you fail to adequately specify the ORDER BY the fault is
yours, not the system's.

David J.

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

Предыдущее
От: digoal@126.com
Дата:
Сообщение: BUG #13791: postgresql 9.5 beta2 brin bug (cann't auto update)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13790: last row of limit/offset result produces duplicates