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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Collation versions on Windows (help wanted, apply within)
Дата
Msg-id 7d44c49b-b570-b699-aef6-9afe73e44751@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Collation versions on Windows (help wanted, apply within)  (Thomas Munro <thomas.munro@gmail.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: automating pg_config.h.win32 maintenance
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: segmentation fault when cassert enabled