Re: dropped default locale - Mailing list pgsql-general

From Laurenz Albe
Subject Re: dropped default locale
Date
Msg-id d42f31908c77654da888f722708b7786cc332800.camel@cybertec.at
Whole thread Raw
In response to dropped default locale  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: dropped default locale
List pgsql-general
On Wed, 2022-12-21 at 15:24 +0100, Karsten Hilbert wrote:
> I managed to drop the "special" collations default, C, and
> POSIX with OIDs 100, 950, 951.
> 
> Is there a way to recreate them (short of restoring a backup)
> ? Naive attempts with create collation do not seem to work
> out.

I would definitely go for the backup, but here is how you can
create these three rows in PostgreSQL v15:

  INSERT INTO pg_collation
    (oid, collname, collnamespace, collowner, collprovider,
     collisdeterministic, collencoding, collcollate, collctype)
  VALUES
    (100, 'default', 11, 10, 'd', TRUE, -1, NULL,    NULL),
    (950, 'C',       11, 10, 'c', TRUE, -1, 'C',     'C'),
    (951, 'POSIX',   11, 10, 'c', TRUE, -1, 'POSIX', 'POSIX');

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: dropped default locale
Next
From: Karsten Hilbert
Date:
Subject: Re: dropped default locale