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.