pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15317: Sort order error
2+ messages / 2 participants
[nested] [flat]
* BUG #15317: Sort order error
@ 2018-08-08 06:53 PG Bug reporting form <noreply@postgresql.org>
2018-08-08 08:26 ` Re: BUG #15317: Sort order error Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2018-08-08 06:53 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: pahwa.sumit@gmail.com
The following bug has been logged on the website:
Bug reference: 15317
Logged by: sumit pahwa
Email address: pahwa.sumit@gmail.com
PostgreSQL version: 10.3
Operating system: Linux
Description:
Version of Postgres deployed
PostgreSQL 10.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623
(Red Hat 4.8.5-16), 64-bit
When I execute a query
select 'ALEX DARGAY' > 'ALEXANDER';
It should return false as output because ascii value of space is lower than
ascii value of 'A'.
But the output is true, which is incorrect.
In a bigger picture, It gives a corrupted sorted order.
However, this works fine on PostgreSQL 10.4, compiled by Visual C++ build
1800, 64-bit
Please suggest.
Thanks
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15317: Sort order error
2018-08-08 06:53 BUG #15317: Sort order error PG Bug reporting form <noreply@postgresql.org>
@ 2018-08-08 08:26 ` Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2018-08-08 08:26 UTC (permalink / raw)
To: pahwa.sumit@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
On 08/08/18 09:53, PG Bug reporting form wrote:
> When I execute a query
> select 'ALEX DARGAY' > 'ALEXANDER';
> It should return false as output because ascii value of space is lower than
> ascii value of 'A'.
> But the output is true, which is incorrect.
The correct answer to that query depends on the current locale. You seem
to be assuming that POSIX / C locale is used. You can check the current
locale's collation order with "show lc_collate;". The locale support is
provided by the Operating System, so even if the locale is nominally the
same, e.g. "UK English", it might behave slightly differently on
different systems.
See the user manual, sections 23.1 Locale Support and 23.2 Collation
Support for more information:
https://www.postgresql.org/docs/10/static/locale.html
https://www.postgresql.org/docs/10/static/collation.html
- Heikki
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-08-08 08:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 06:53 BUG #15317: Sort order error PG Bug reporting form <noreply@postgresql.org>
2018-08-08 08:26 ` Heikki Linnakangas <hlinnaka@iki.fi>
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