Re: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8) - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8)
Date
Msg-id 354889.1656081388@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8)  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-general
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> There are also cases where on one system the locale is spelled 
> xx_YY.UTF8 and on another xx_YY.UTF-8.  If we start adjusting for case, 
> should we adjust for this as well?  What other cases are there?
> So this would need a bit more research.

Yeah.  I would tend to define it as "if the locale names both end
in dot followed by a recognizable encoding name, then (a) make
sure that the encoding values are the same, then (b) strip off
the dot and encoding before comparing the rest".  We already have
code to look up encoding names, and it handles all these variants.
So this doesn't seem like it should take much new code, though
maybe some refactoring would be needed to make the lookup code
available where this check is happening.

I'm not personally very excited about this, but if someone wanted
to prepare a patch...

            regards, tom lane



pgsql-general by date:

Previous
From: "Mahendrakar, Prabhakar - Dell Team"
Date:
Subject: RE: Postgresql error : PANIC: could not locate a valid checkpoint record
Next
From: Ninad Shah
Date:
Subject: Re: Automatic autovacuum to prevent wraparound - PG13.5