public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Jehan-Guillaume de Rorthais <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Sorting regression of text function result since commit 586b98fdf1aae
Date: Mon, 11 Dec 2023 15:43:12 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <20231211210951.5020a5d6@karst>
References: <20231211210951.5020a5d6@karst>
Jehan-Guillaume de Rorthais <[email protected]> writes:
> It looks like since 586b98fdf1aae, the result type collation of "convert_from"
> is forced to "C", like the patch does for type "name", instead of the "default"
> collation for type "text".
Well, convert_from() inherits its result collation from the input,
per the normal rules for collation assignment [1].
> Looking at hints in the header comment of function "exprCollation", I poked
> around and found that the result collation wrongly follow the input collation
> in this case.
It's not "wrong", it's what the SQL standard requires.
> I couldn't find anything explaining this behavior in the changelog. It looks
> like a regression to me, but if this is actually expected, maybe this deserve
> some documentation patch?
The v12 release notes do say
Type name now behaves much like a domain over type text that has
default collation āCā.
You'd have similar results from an expression involving such a domain,
I believe.
I'm less than excited about patching the v12 release notes four
years later. Maybe, if this point had come up in a more timely
fashion, we'd have mentioned it --- but it's hardly possible to
cover every potential implication of such a change in the
release notes.
regards, tom lane
[1] https://www.postgresql.org/docs/current/collation.html#COLLATION-CONCEPTS
view thread (5+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Sorting regression of text function result since commit 586b98fdf1aae
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox