Re: Possible locale issue with 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible locale issue with 7.4
Date: 2003-09-29 00:09:31
Message-ID: 15092.1064794171@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> In 7.4 I am finding that '(' (and some other punctuation) is not a member of
> [:print:]. It is in 7.3. It is a member of [:graph:] in 7.4 (which is
> supposed to be [:print:] - [:space:]).

This is not a locale problem, because I see it in C locale too.
[digs] Apparently this is an oversight in the new regex code we
lifted from Tcl 8.4.1:

switch ((enum classes) index)
{
case CC_PRINT:
case CC_ALNUM:
cv = getcvec(v, UCHAR_MAX, 1, 0);
if (cv)
{
for (i = 0; i <= UCHAR_MAX; i++)
{
if (pg_isalpha((chr) i))
addchr(cv, (chr) i);
}
addrange(cv, (chr) '0', (chr) '9');
}
break;

in other words, :print: is the same as :alnum:. This is obviously
a bug, will fix ... wonder if Henry Spencer knows about it?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2003-09-29 00:25:17 Re: Possible locale issue with 7.4
Previous Message Marc G. Fournier 2003-09-28 23:52:44 Re: pgsql-server/src/backend catalog/index.c comma ...