Re: What's a good default encoding? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: What's a good default encoding?
Date
Msg-id 20060321115025.GA11045@svana.org
Whole thread Raw
In response to Re: What's a good default encoding?  (Vivek Khera <vivek@khera.org>)
Responses Re: What's a good default encoding?  ("Merlin Moncure" <mmoncure@gmail.com>)
Re: What's a good default encoding?  (Vivek Khera <vivek@khera.org>)
List pgsql-general
On Mon, Mar 20, 2006 at 06:07:16PM -0500, Vivek Khera wrote:
> So, if I use a UTF8 encoded DB on FreeBSD, all hell will break loose
> or what?  Will things not compare correctly?  Where from does the
> code to do the collating come, then?

It just won't collate properly. PostgreSQL collation is provided by the
underlying C library via strcoll(). FreeBSD simply doesn't support
UTF-8 collation. IIRC the UTF-8 collation code simply uses the ASCII
collation. It's an order, just not the order most people will be
expecting.

If you look at the collation code in FreeBSD you'll see it doesn't work
for any multibyte encoding. That's OK, it's obviously not important to
FreeBSD users.

But I'm ademantly against building and maintaining a special UTF-8
collation library just for PostgreSQL. That's just reinventing the
wheel. There already exist cross-platform libraries to handle collation
and we should work towards allowing people to use one of those...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: PANIC: heap_update_redo: no block
Next
From: Terry Lee Tucker
Date:
Subject: Order of Update - Second Try