Re: Dynamic collation support

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dynamic collation support
Date: 2016-01-19 15:57:22
Message-ID: CAHyXU0xy8zqvrYiADYTtyO_NMwi=iUcmZ=a67=NCAy+wa+SpTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 19, 2016 at 9:42 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> On Tue, Jan 19, 2016 at 9:15 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
>> Different collates requires different plans - so using dynamic SQL is much
>> more correct.
>>
>> It is same like using variables as columns or tablenames.
>
> Right -- I get it, and I understand the planner issues. But the
> amount of revision that goes into a database that internationalizes
> can be pretty large. To do it right, any static sql that involves
> string ordering can't be used. pl/sql also can't be used. ISTM this
> is impolite to certain coding styles.

Hm, an extension wrapper to strxrm() might do the trick when
flexibility is favored over performance. You'd have to constantly
mange the locale to make it work though.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-01-19 16:09:21 Re: Postgre compatible version with RHEL 7.2
Previous Message Merlin Moncure 2016-01-19 15:42:36 Re: Dynamic collation support