Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails - Mailing list pgsql-bugs

From Jiří Fejfar
Subject Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Date
Msg-id CA+8wVNXXwj=hY9W8CNM=-RMd4_zuwVvJW3FWB+VZ8ObGT+DjWQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, 19 Aug 2020 at 07:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> =?UTF-8?B?SmnFmcOtIEZlamZhcg==?= <jurafejfar@gmail.com> writes:
> > I am just wondering: if it is bug in IMPORT FOREIGN SCHEMA, how it is
> > possible the bug is not present [1] when provided psql script [2] is run
> > on Alpine Linux?
>
> [ shrug ]  Could easy be that Alpine distributes dumbed-down locale
> definitions in which the sort order isn't actually any different
> between those two locales.  Did you check what the sort order of
> your test data looks like in each case?
>
>                         regards, tom lane

Oh, I can see on Alpine that even local tables are ordered like with
en.US-UTF8 even if DB has default cs.CZ-UTF8.

postgres=# \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |
Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 db_cz     | postgres | UTF8     | cs_CZ.UTF-8 | cs_CZ.UTF-8 |
 db_en     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 ...
postgres=# \c db_cz ;
You are now connected to database "db_cz" as user "postgres".
db_cz=# select * from t_nuts order by label;
 id | label
----+--------
  1 | CZ0100
  2 | CZ0201
...

 11 | CZ020A
 12 | CZ020B
 13 | CZ020C

...

It is mentioned in Alpine docker docs [1] that "Alpine-based variants
do not support locales;".

Thanks, J.

[1] https://hub.docker.com/_/postgres



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails
Next
From: PG Bug reporting form
Date:
Subject: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS