[HACKERS] CREATE COLLATION definitional questions for ICU - Mailing list pgsql-hackers

From Tom Lane
Subject [HACKERS] CREATE COLLATION definitional questions for ICU
Date
Msg-id 10962.1498405528@sss.pgh.pa.us
Whole thread Raw
Responses Re: [HACKERS] CREATE COLLATION definitional questions for ICU  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] CREATE COLLATION definitional questions for ICU  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] CREATE COLLATION definitional questions for ICU  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] CREATE COLLATION definitional questions for ICU  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Reading over DefineCollation, I wondered:

* Should not the FROM code path copy the old collation's version?
It seems a little bit weird that "cloning" a collation takes the
liberty of installing a new version.

* Also (and this would be a pre-existing bug), why doesn't the FROM
path copy the old collation's encoding?  For example, if you attempted
to clone the "C" encoding, you wouldn't get a true clone but something
that's specific to the current DB's encoding.

* For an ICU collation, should we not insist that collcollate and
collctype be equal?  If not, what does it mean for them to be different?

* Now that it's possible for user-created collations to have encoding -1,
I do not think that the "shadowing" tests in CollationCreate and
IsThereCollationInNamespace are sufficient.  They don't prevent a new
collation with encoding -1 from shadowing an existing encoding-specific
collation that doesn't happen to match the current DB's encoding.
Now, you'd have to work at it for that to cause problems --- say,
create such a situation in template0 and then copy template0 specifying
that other encoding.  But none of that is forbidden.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Walsender timeouts and large transactions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Is exec_simple_check_node still doing anything?