pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17766: Issue in asc, limit and offset for pagination.
3+ messages / 3 participants
[nested] [flat]
* BUG #17766: Issue in asc, limit and offset for pagination.
@ 2023-02-01 06:38 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 2 replies; 3+ messages in thread
From: PG Bug reporting form @ 2023-02-01 06:38 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: prgopikrishnan85@gmail.com
The following bug has been logged on the website:
Bug reference: 17766
Logged by: PR Gopi krishnan
Email address: prgopikrishnan85@gmail.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #17766: Issue in asc, limit and offset for pagination.
@ 2023-02-01 09:12 John Naylor <john.naylor@enterprisedb.com>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: John Naylor @ 2023-02-01 09:12 UTC (permalink / raw)
To: prgopikrishnan85@gmail.com; pgsql-bugs@lists.postgresql.org
On Wed, Feb 1, 2023 at 3:54 PM PG Bug reporting form <noreply@postgresql.org>
wrote:
> 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
Hi,
You mentioned that the field has duplicate name values, so selecting that
column will produce a result set that has duplicates also. A "limit" clause
is not going to change that.
If you still think something is not behaving as expected, please provide a
reproducible test case.
--
John Naylor
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #17766: Issue in asc, limit and offset for pagination.
@ 2023-02-01 11:10 hubert depesz lubaczewski <depesz@depesz.com>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: hubert depesz lubaczewski @ 2023-02-01 11:10 UTC (permalink / raw)
To: prgopikrishnan85@gmail.com; pgsql-bugs@lists.postgresql.org
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@gmail.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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-02-01 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 06:38 BUG #17766: Issue in asc, limit and offset for pagination. PG Bug reporting form <noreply@postgresql.org>
2023-02-01 09:12 ` John Naylor <john.naylor@enterprisedb.com>
2023-02-01 11:10 ` hubert depesz lubaczewski <depesz@depesz.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox