Re: locale - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: locale
Date
Msg-id Pine.LNX.4.44.0404081559430.4551-100000@zigo.dhs.org
Whole thread Raw
In response to Re: locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: locale  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 8 Apr 2004, Tom Lane wrote:

> See my previous point: the index does not actually fail, in our current
> implementation, because strcoll() is unaffected by the database's
> encoding setting.

How can it be? If I have a utf-8 template1 and a table with an index
sorted according to the utf-8 characters in some locale. Then this table
and index is copied into a Latin1 database. When I interpret these bytes
as Latin1 in the index, the ordering does not have to be the same as it 
was before and the index can not be used.

I don't understand what you mean when you say that strcoll() is unaffected
by the database's encoding setting. It interprets characters, how can it 
not be?

If it works it must be something more going on that I don't
know/understand yet. If I am I would be happy to be corrected, if not we
have a more broken system then we expected before.
        
 
The objection to a per database locale is that we can not copy a table 
from the template into the database since the index would not be valid 
anymore. To me that is solvable by just reindexing. The current problem 
with encodings does not look solvable at all to me (except to not copy 
tables when we can not reencode the strings).

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: locale
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL configuration