pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Possible to create a hidden collation
Date: Mon, 15 May 2023 15:04:21 -0700
Message-ID: <0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com> (raw)
In-Reply-To: <226e3a10-41c6-4150-a31e-e806d7c0efd4@manitou-mail.org>
References: <226e3a10-41c6-4150-a31e-e806d7c0efd4@manitou-mail.org>

On Sat, 2023-05-13 at 14:28 +0200, Daniel Verite wrote:
> ISTM that this behavior is not due to collencoding=-1, but
> to the custom "en_US" collation being in the "public" schema
> whereas the built-in "en_US" is in "pg_catalog".

My mistake -- it looks like this is not a bug and I don't see a real
problem here. Thank you for looking.

> So maybe it's better to set collencoding to the db encoding as done
> by the patch, but it's not clear what concrete problem it solves.

I was a bit bothered by the inconsistency between libc and icu here,
and I still feel like this patch is probably the right thing to do.

If nothing else, right now the error messages are inconsistent:

  create collation test(provider='libc', locale='en_US.utf8');
  CREATE COLLATION
  create collation test(provider='libc', locale='en_US.utf8');
  ERROR:  collation "test" for encoding "UTF8" already exists
  create collation test(provider='icu', locale='und');
  ERROR:  collation "test" already exists

The patch fixes that. Not terribly important, but having a consistent
catalog representation seems like a good idea.

Regards,
	Jeff Davis






view thread (5+ messages)

Message-ID: <0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com>
Permalink:  ../0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com/
Also on:    postgresql.org/message-id/0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pgsql@j-davis.com, daniel@manitou-mail.org
  Subject: Re: Possible to create a hidden collation
  In-Reply-To: <0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com>
  References: <226e3a10-41c6-4150-a31e-e806d7c0efd4@manitou-mail.org> <0cecbce97966383dfa607f860249267d932b6921.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox