Re: Collation versions on Windows (help wanted, apply within) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Collation versions on Windows (help wanted, apply within)
Date
Msg-id CA+hUKGKnzWtoZ+xo0q+cz+JEgn0b3Q=+T8wGjdZdyB1LAXrknw@mail.gmail.com
Whole thread Raw
In response to Re: Collation versions on Windows (help wanted, apply within)  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Collation versions on Windows (help wanted, apply within)
List pgsql-hackers
On Wed, Dec 18, 2019 at 11:02 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Tue, Dec 17, 2019 at 1:40 AM Juan José Santamaría Flecha
> <juanjo.santamaria@gmail.com> wrote:
> > This is a resume to illustrate an issue with locale = 'C':
> >
> > postgres=#   CREATE COLLATION c_test (locale = 'C');
> > CREATE COLLATION
> > 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>
> >  und-x-icu              | i            |           -1 | und              | und              | 153.97
> > [... resumed ...]
> >  c_test                 | c            |            6 | C                | C                |
> > (757 rows)
> >
> >  Shouldn't it be NULL?

Done in this new 0002 patch (untested).  0001 removes the comment that
individual collations can't have a NULL version, reports NULL for
Linux/glibc collations like C.UTF-8 by stripping the suffix and
comparing with C and POSIX as suggested by Peter E.

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: type of some table storage params on doc
Next
From: Amit Langote
Date:
Subject: Re: adding partitioned tables to publications