Re: Possible locale issue with 7.4 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Possible locale issue with 7.4
Date
Msg-id 15092.1064794171@sss.pgh.pa.us
Whole thread Raw
In response to Possible locale issue with 7.4  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Possible locale issue with 7.4  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Possible locale issue with 7.4  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-hackers
Bruno Wolff III <bruno@wolff.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: more i18n/l10n issues
Next
From: Gaetano Mendola
Date:
Subject: Re: Problem with function permission test in a view