Re: Collations versus user-defined functions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collations versus user-defined functions
Date: 2011-03-13 16:26:16
Message-ID: 18639C02-6C03-4CFB-B568-B028E3CADC2A@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mar 13, 2011, at 8:25 AM, Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-03-13 17:16:36 Re: Collations versus user-defined functions
Previous Message Martijn van Oosterhout 2011-03-13 12:25:23 Re: Collations versus user-defined functions