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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation versions on Windows (help wanted, apply within)
Date: 2020-03-23 04:58:53
Message-ID: CA+hUKGKnzWtoZ+xo0q+cz+JEgn0b3Q=+T8wGjdZdyB1LAXrknw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 18, 2019 at 11:02 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Tue, Dec 17, 2019 at 1:40 AM Juan José Santamaría Flecha
> <juanjo(dot)santamaria(at)gmail(dot)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 Content-Type Size
v3-0001-Allow-NULL-version-for-individual-collations.patch text/x-patch 2.2 KB
v3-0002-Add-collation-versions-for-Windows.patch text/x-patch 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-03-23 05:02:25 Re: adding partitioned tables to publications
Previous Message Michael Paquier 2020-03-23 04:58:51 Re: type of some table storage params on doc