Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Date: 1999-06-10 14:30:56
Message-ID: 199906101430.XAA00764@ext16.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I believe we can make the assumption, that if you --enable-locale, but do not
> use --with-mb, then you are using single-byte locales and therefore the hack
> might work properly.

I believe at least one person uses both --enable-locale and --with-mb
for single byte locale.

> If you use --with-mb you are out of luck until someone
> explains better how multibyte characters are ordered.

I think until NATIONAL CHARACTER is fully implemented, we would not be
able to properly handle sort orders with multi-byte characters.
(Thomas, I've been think about implementing NCHAR too!)

So you could do whatever you like as long as they are in #ifndef
MULTIBYTE:-)

> I found this later problem to be resolved by modifying the
> backend/regex/makefile to add -funsigned-char to CFLAGS. This is under BSD/OS
> 4.0.1 - I found out, that by default characters that are 'alpha' in cyrillic
> are threated by the compiler as negative and therefore isalpha() returns
> zero... I believe this should be fixed as it may be causing other problems
> with non-ASCII locales.
>
> My proposal is to add -funsigned-char to all places where routines such as
> 'isalpha' are used, and ifdef it for USE_LOCALE.

Once I propsed another solution to BSD/OS guy (I don't remember who he
was) and asked him to check if it worked. Unfortunately I got no
answer from him. Then I merged it into #ifdef MULTIBYTE sections in
regcomp.c and it seems work at least for cyrillic locale (Thanks Oleg
for testing!).
---
Tatsuo Ishii

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-06-10 14:32:45 Re: [HACKERS] transaction rollbacks on error
Previous Message Thomas Lockhart 1999-06-10 14:29:25 Re: [HACKERS] transaction rollbacks on error