Re: Locale agnostic unicode text

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Locale agnostic unicode text
Date: 2005-01-24 14:57:02
Message-ID: 87r7ka6fk1.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Sat, 22 Jan 2005 17:09:42 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > > This time setlocale() was needed to get the behaviour
> > > I needed (database initdb'ed to 'C', my order set to 'pl_PL',
> > > or whatever locale I need at given moment).
> > I would imagine that the performance is spectacularly awful :-(.
> > Have you benchmarked it? A large sort on a unitext column,
> > for instance, would be revealing.

Why do you persist in believing this? I sent timing results of doing a
setlocale for every record here about a year ago. Sorting on the pg_strxfrm I
posted (and Conway rewrote) was about twice as slow as sorting without using
it. So it's slow but not spectacularly awful.

This depends on having a good setlocale implementation, but glibc at least
seems to be satisfactory.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2005-01-24 15:28:09 Re: Much Ado About COUNT(*)
Previous Message Manfred Koizar 2005-01-24 11:12:24 Re: Autotuning Group Commit