Re: postgres & server encodings

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Salem Berhanu <salemb4(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres & server encodings
Date: 2005-08-09 16:52:00
Message-ID: 5.2.1.1.1.20050810002451.040956b8@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

At 05:59 PM 8/9/2005 +0200, Martijn van Oosterhout wrote:

>SQL_ASCII means that the database does no locale specific or language
>specific encoding ever. It won't check what you send it either. If
>you're content to let clients deal with any encoding issues, this may
>be what you want.
>
>But anything to do with lower(), upper(), case-insenstive in the
>database itself will be totally stupid since it's assuming ASCII.

Is it possible or even good to have the ability to allow you to pick a
particular locale for a query/function?

e.g. select * from messages where locale_code=$locale_code order by
locale_code, multilocale_lower(message,locale);

Or even:

create index lower_keyword_idx on keywords (multilocale_lower(keyword,locale))
(there's a column called locale in both tables)

Does that actually make sense? ;)

I suppose we can do that in the client. But it'll be nicer if we can use
"order by", "group by", and do it for more than one locale at a time.

Can Postgresql currently handle more than one locale within the same
database AND have some useful locale sensitive DB functions?

Regards,
Link.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joel Fradkin 2005-08-09 16:56:37 Re: [GENERAL] postgres & server encodings
Previous Message Tom Lane 2005-08-09 16:48:09 Re: postgres & server encodings

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-08-09 16:53:19 Re: Query stucked in pg_stat_activity
Previous Message Tom Lane 2005-08-09 16:48:09 Re: postgres & server encodings