pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16083: Different Result
2+ messages / 2 participants
[nested] [flat]

* BUG #16083: Different Result
@ 2019-10-28 07:15  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-10-28 07:15 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: mr.poetra22@gmail.com

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16083: Different Result
@ 2019-10-28 07:35  Pavel Stehule <pavel.stehule@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Pavel Stehule @ 2019-10-28 07:35 UTC (permalink / raw)
  To: PG Bug reporting form <noreply@postgresql.org>; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; mr.poetra22@gmail.com

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-10-28 07:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 07:15 BUG #16083: Different Result PG Bug reporting form <noreply@postgresql.org>
2019-10-28 07:35 ` Pavel Stehule <pavel.stehule@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