> On Sat, 22 Jan 2005 17:09:42 -0500, Tom Lane <tgl@sss.pgh.pa.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