Re: BUG #16083: Different Result

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PG Bug reporting form <noreply(at)postgresql(dot)org>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, mr(dot)poetra22(at)gmail(dot)com
Subject: Re: BUG #16083: Different Result
Date: 2019-10-28 07:35:35
Message-ID: CAFj8pRA7=UiqrSW=KY985w6i6jBwtdkt08UFT=Hx-kXQrej-vA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

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

> The following bug has been logged on the website:
>
> Bug reference: 16083
> Logged by: Eka Setiawan Saputra
> Email address: mr(dot)poetra22(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message william allen 2019-10-28 14:28:59 RE: BUG #15858: could not stat file - over 4GB
Previous Message PG Bug reporting form 2019-10-28 07:15:16 BUG #16083: Different Result