Re: Collations versus user-defined functions - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Collations versus user-defined functions
Date
Msg-id 18639C02-6C03-4CFB-B568-B028E3CADC2A@gmail.com
Whole thread Raw
In response to Re: Collations versus user-defined functions  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Mar 13, 2011, at 8:25 AM, Martijn van Oosterhout <kleptog@svana.org> wrote:
What you're suggesting is going to lead to situations where the user
sets a non-default collation on every field in every table in the
database and depending on the query they will sometimes get the default
collation anyway.

Not that I know a lot about this, but I agree there should be some kind of bubbling up here. ISTM that you could think of this as replacing the text type (and maybe others) by a collection of closely related types, and operators like >(text, text) become parametrically polymorphic.  I am not entirely convinced that there won't be corner cases when this implicit polymorphism will get it wrong, but if it does we can apply a suitably sized band-aid. I agree with Martijn's analysis that it will get it right a lot more often; and consequently avoid the need for a lot of manual fiddling.

...Robert

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Collations versus user-defined functions
Next
From: Tom Lane
Date:
Subject: Re: Collations versus user-defined functions