On Mon, 8 Mar 1999, Vadim Valiakhmetov wrote:

> Subject: [HACKERS] Postgress case insensitive search on FreeBSD3.0

> I have encountered strange behaviour of Postgresql-6.4.2 server
> (installed on FreeBSD3.0 from distributive) when I was trying to do
> case-insensitive search in simplest text table (without indexes)

Try to compile with unsigend chars, if the problem persists then you have
the same problem that I witnessed on BSDi.

You will need to manually edit regexp.c and cast all chars to unsigned chars
in all the pg_upper and pg_lower function calls.




-- 
Incredible Networks LTD       Angelos Karageorgiou
20 Karea st,                  +30.1.92.12.312 (voice)
116 36 Athens, Greece.        +30.1.92.12.314 (fax)
http://www.incredible.com     angelos@incredible.com (e-mail)


Mon, 8 Mar 1999 15:22:35 +0200 (EET)
Angelos Karageorgiou <angelos@awesome.incredible.com>
Re: [HACKERS] Postgress case insensitive search on FreeBSD3.0
Hello!

I have encountered strange behaviour of Postgresql-6.4.2 server
(installed on FreeBSD3.0 from distributive) when I was trying to do
case-insensitive search in simplest text table (without indexes)
containing sequence of strings of characters from national alphabet
(Russian KOI8-R and CP1251 character sets). The following example query
does not do case insensitive search for both KOI8-R and CP1251:

select firm from plan  where  firm ~* ('substring')   order by  firm asc

Here 'substring' consists of russian characters, of course.

I believe, that my russian locale  properly configured and working, as
well as postmaster compiled with option --enable-locale. Environment
variables $LC_CTYPE and $LC_COLLATE also defined. For instance,
operators upper('substring') and lower ('substring') both working
correctly with russian characters.

Just the same example query does case insensitive search under RedHat
Linux 4.2 with glibc2 installed. All postmaster settings were the same
as for FreeBSD.

Can anybody clarify this situation ?

Thanks in advance, and sorry for bad english.

Vadim Valiakhmetov           mailto:vadim@sibfair.nsc.ru
Sysadmin, SibLine Co.




Mon, 08 Mar 1999 19:22:52 +0600
Vadim Valiakhmetov <vadim@sibfair.nsc.ru>
Postgress case insensitive search on FreeBSD3.0