Re: Collation versions on Windows (help wanted, apply within)

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation versions on Windows (help wanted, apply within)
Date: 2019-12-16 12:20:59
Message-ID: 7d44c49b-b570-b699-aef6-9afe73e44751@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-12-16 01:26, Thomas Munro wrote:
> While wondering about that, I noticed the "C.UTF-8" encoding (here on
> a glibc system):
>
> postgres=# \pset null <NULL>
> Null display is "<NULL>".
> postgres=# select collname, collprovider, collencoding, collcollate,
> collctype, collversion from pg_collation ;
> collname | collprovider | collencoding | collcollate | collctype |
> collversion
> ------------+--------------+--------------+-------------+------------+-------------
> default | d | -1 | | | <NULL>
> C | c | -1 | C | C | <NULL>
> POSIX | c | -1 | POSIX | POSIX | <NULL>
> ucs_basic | c | 6 | C | C | <NULL>
> C.UTF-8 | c | 6 | C.UTF-8 | C.UTF-8 | 2.28
> en_NZ.utf8 | c | 6 | en_NZ.utf8 | en_NZ.utf8 | 2.28
> en_NZ | c | 6 | en_NZ.utf8 | en_NZ.utf8 | 2.28
> (7 rows)
>
> I wonder if we should do something to give that no collversion, since
> we know that it's really just another way of spelling "binary sort
> please", or if we'd be better off not trying to interpret the names
> locale -a spits out.

I think it's worth handling that separately. If we want to give it an
air of generality and not just hard-code that one locale name, we could
strip off the encoding and compare the rest with the well-known encoding
names.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-16 12:27:43 Re: segmentation fault when cassert enabled
Previous Message Peter Eisentraut 2019-12-16 12:12:27 Re: automating pg_config.h.win32 maintenance