pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17168: Incorrect sorting
3+ messages / 3 participants
[nested] [flat]
* BUG #17168: Incorrect sorting
@ 2021-08-30 17:50 PG Bug reporting form <noreply@postgresql.org>
2021-08-30 18:09 ` Re: BUG #17168: Incorrect sorting David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2021-08-30 17:50 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: alfonsovicente@gmail.com
The following bug has been logged on the website:
Bug reference: 17168
Logged by: Alfonso Vicente
Email address: alfonsovicente@gmail.com
PostgreSQL version: 13.2
Operating system: Red Hat Enterprise Linux 8
Description:
This is a minimal example to reproduce the error, the "ara" tuple is
incorrectly sorted between "a r" and "a s"
test=> with s1 as (select 'a r' c), s2 as (select 'ara' c), s3 as (select 'a
s' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a r
ara
a s
(3 rows)
It appears to be related with spaces, here are two examples that shows the
same problem with the "ara" and "aja" strings
Example 1
------------------
test=> with s1 as (select 'a r' c), s2 as (select 'ara' c), s3 as (select 'a
q' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a q
a r
ara
(3 rows)
test=> with s1 as (select 'a r' c), s2 as (select 'ara' c), s3 as (select 'a
r' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a r
a r
ara
(3 rows)
test=> with s1 as (select 'a r' c), s2 as (select 'ara' c), s3 as (select 'a
s' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a r
ara
a s
(3 rows)
Example 2
------------------
test=> with s1 as (select 'a j' c), s2 as (select 'aja' c), s3 as (select 'a
i' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a i
a j
aja
(3 rows)
test=> with s1 as (select 'a j' c), s2 as (select 'aja' c), s3 as (select 'a
j' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a j
a j
aja
(3 rows)
test=> with s1 as (select 'a j' c), s2 as (select 'aja' c), s3 as (select 'a
k' c) select c from (select c from s1 union all select c from s2 union all
select c from s3) as foo order by 1;
c
-----
a j
aja
a k
(3 rows)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #17168: Incorrect sorting
2021-08-30 17:50 BUG #17168: Incorrect sorting PG Bug reporting form <noreply@postgresql.org>
@ 2021-08-30 18:09 ` David G. Johnston <david.g.johnston@gmail.com>
2021-08-30 18:16 ` Re: BUG #17168: Incorrect sorting Alfonso Vicente <alfonsovicente@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: David G. Johnston @ 2021-08-30 18:09 UTC (permalink / raw)
To: alfonsovicente@gmail.com <alfonsovicente@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
On Monday, August 30, 2021, PG Bug reporting form <noreply@postgresql.org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17168
> Logged by: Alfonso Vicente
> Email address: alfonsovicente@gmail.com
> PostgreSQL version: 13.2
> Operating system: Red Hat Enterprise Linux 8
> Description:
>
> This is a minimal example to reproduce the error, the "ara" tuple is
> incorrectly sorted between "a r" and "a s"
>
By what authority are you claiming that the correct order is not this
(i.e., what claim is being violated, and thus is buggy?). And what are the
sort-related settings that are in effect?
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #17168: Incorrect sorting
2021-08-30 17:50 BUG #17168: Incorrect sorting PG Bug reporting form <noreply@postgresql.org>
2021-08-30 18:09 ` Re: BUG #17168: Incorrect sorting David G. Johnston <david.g.johnston@gmail.com>
@ 2021-08-30 18:16 ` Alfonso Vicente <alfonsovicente@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Alfonso Vicente @ 2021-08-30 18:16 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
You're right, I was incorrectly working with en_US.UTF-8 lc_collate because
of a cloning issue
Regards,
Alfonso Vicente
On Mon, Aug 30, 2021 at 3:09 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Monday, August 30, 2021, PG Bug reporting form <noreply@postgresql.org>
> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 17168
>> Logged by: Alfonso Vicente
>> Email address: alfonsovicente@gmail.com
>> PostgreSQL version: 13.2
>> Operating system: Red Hat Enterprise Linux 8
>> Description:
>>
>> This is a minimal example to reproduce the error, the "ara" tuple is
>> incorrectly sorted between "a r" and "a s"
>>
>
> By what authority are you claiming that the correct order is not this
> (i.e., what claim is being violated, and thus is buggy?). And what are the
> sort-related settings that are in effect?
>
> David J.
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-08-30 18:16 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 17:50 BUG #17168: Incorrect sorting PG Bug reporting form <noreply@postgresql.org>
2021-08-30 18:09 ` David G. Johnston <david.g.johnston@gmail.com>
2021-08-30 18:16 ` Alfonso Vicente <alfonsovicente@gmail.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