Re: BUG #16083: Different Result - Mailing list pgsql-bugs

From Pavel Stehule
Subject Re: BUG #16083: Different Result
Date
Msg-id CAFj8pRA7=UiqrSW=KY985w6i6jBwtdkt08UFT=Hx-kXQrej-vA@mail.gmail.com
Whole thread Raw
In response to BUG #16083: Different Result  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16083: Different Result
Next
From: william allen
Date:
Subject: RE: BUG #15858: could not stat file - over 4GB