Re: Add standard collation UNICODE - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: Add standard collation UNICODE
Date
Msg-id 49417853-7bdd-4b23-a4e9-04c7aff33821@manitou-mail.org
Whole thread Raw
In response to Add standard collation UNICODE  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: Add standard collation UNICODE
List pgsql-hackers
    Peter Eisentraut wrote:

>      COLLATE UNICODE
>
> instead of
>
>      COLLATE "und-x-icu"
>
> or whatever it is, is pretty useful.
>
> So, attached is a small patch to add this.

This collation has an empty pg_collation.collversion column, instead
of being set to the same value as "und-x-icu" to track its version.


postgres=# select * from pg_collation  where collname='unicode' \gx
-[ RECORD 1 ]-------+--------
oid            | 963
collname        | unicode
collnamespace        | 11
collowner        | 10
collprovider        | i
collisdeterministic | t
collencoding        | -1
collcollate        |
collctype        |
colliculocale        | und
collicurules        |
collversion        |

The original patch implements this as an INSERT in which it would be easy to
fix I guess, but in current HEAD it comes as an entry in
include/catalog/pg_collation.dat:

{ oid => '963',
  descr => 'sorts using the Unicode Collation Algorithm with default
settings',
  collname => 'unicode', collprovider => 'i', collencoding => '-1',
  colliculocale => 'und' },

Should it be converted back into an INSERT or better left
in this file and collversion being updated afterwards?


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Denis Laxalde
Date:
Subject: Re: Add PQsendSyncMessage() to libpq
Next
From: Masahiko Sawada
Date:
Subject: Re: Should vacuum process config file reload more often