BUG #16083: Different Result

Started by PG Bug reporting formover 6 years ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 16083
Logged by: Eka Setiawan Saputra
Email address: mr.poetra22@gmail.com
PostgreSQL version: 9.6.15
Operating system: Linux & Windows
Description:

This query is show different result ordering on windows and linux

SELECT * FROM (
SELECT '{A}' AS Y UNION
SELECT '{A, AA}' AS Y UNION
SELECT '{A, AA, AAA}' AS Y
) X
ORDER BY Y ASC

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #16083: Different Result

Hi

po 28. 10. 2019 v 8:16 odesílatel PG Bug reporting form <
noreply@postgresql.org> napsal:

The following bug has been logged on the website:

Bug reference: 16083
Logged by: Eka Setiawan Saputra
Email address: mr.poetra22@gmail.com
PostgreSQL version: 9.6.15
Operating system: Linux &amp; Windows
Description:

This query is show different result ordering on windows and linux

SELECT * FROM (
SELECT '{A}' AS Y UNION
SELECT '{A, AA}' AS Y UNION
SELECT '{A, AA, AAA}' AS Y
) X
ORDER BY Y ASC

Postgres uses system libraries for sorting, and then there can be two
situations.

a) you use different locale on Linux than on Windows

postgres=# select datname, datcollate from pg_database ;
┌───────────┬─────────────┐
│ datname │ datcollate │
╞═══════════╪═════════════╡
│ postgres │ cs_CZ.UTF-8 │
│ template1 │ cs_CZ.UTF-8 │
│ template0 │ cs_CZ.UTF-8 │
│ ooo │ cs_CZ.UTF-8 │
└───────────┴─────────────┘
(4 rows)

b) the locale implementation on linux and on windows can be different is
some details - I know about some different details on Czech collate.

I don't think so it is your case. Probably you have some natural locale on
one server and C collate on second server.

Regards

Pavel Stehule