| From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
|---|---|
| To: | prgopikrishnan85(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #17766: Issue in asc, limit and offset for pagination. |
| Date: | 2023-02-01 11:10:57 |
| Message-ID: | Y9pIwXnYSEcZg9uG@depesz.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Wed, Feb 01, 2023 at 06:38:47AM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17766
> Logged by: PR Gopi krishnan
> Email address: prgopikrishnan85(at)gmail(dot)com
> PostgreSQL version: 15.1
> Operating system: windows and linux
> Description:
>
> While getting the rows with the columns called name which has duplicate
> names, now ascending the rows by name with limit 25 and offset 0,25,50 like
> this on each query. But the rows are duplicating with the names
This is not a bug. Simply make sure that your order by clause is over
unique combination.
So, if your name has duplicates, then add primary key to order by
clause:
order by name, id
depesz
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2023-02-01 11:57:41 | Re: range_agg extremely slow compared to naive implementation in obscure circumstances |
| Previous Message | PG Bug reporting form | 2023-02-01 09:45:39 | BUG #17767: psql: tab-completion causes warnings when standard_conforming_strings = off |