strcoll_l an new approach for locale per column

Lists: pgsql-hackers
From: Mahmoud Taghizadeh <m_taghi(at)yahoo(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: strcoll_l an new approach for locale per column
Date: 2004-12-22 09:12:36
Message-ID: 20041222091236.61241.qmail@web50707.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

in this list there is some discussion about adding
support locale per column.
as far as I know the final result was that:
because postgresql uses glibc locale functions, and
because glibc only handle one locale, postgresql also
suppor only one locale at the same time.

one solution was that use some help functions (such as
nls_sort, or strxfrm...) and use setlocale to support
other locale.

the main problem with these solutions was that
1. it is not standart
2. the overhead of setlocale is too high

as far as I investigate the glibc code, I found some
extention function such as strcol_l and strxfrm_l that
let you to pass locale to them. so you dont have to
change locale repeatedly.

I want to know the groups idea?

Best Regards


__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mahmoud Taghizadeh <m_taghi(at)yahoo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: strcoll_l an new approach for locale per column
Date: 2004-12-22 16:19:16
Message-ID: 4339.1103732356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mahmoud Taghizadeh <m_taghi(at)yahoo(dot)com> writes:
> as far as I investigate the glibc code, I found some
> extention function such as strcol_l and strxfrm_l that
> let you to pass locale to them. so you dont have to
> change locale repeatedly.

Sorry, but depending on glibc-only functionality is a non-starter.
We run on many platforms that use other libc implementations.
Anything not standardized by the Single Unix Spec isn't even worth
suggesting...
http://www.opengroup.org/onlinepubs/007908799/

regards, tom lane