Sergey Burladyan <eshkin...@gmail.com> writes: > As i can see in Tom's patch 0d323425 only functions like pg_wc_isalpha is > changed, but > this pg_wc_isalpha is called from > static struct cvec * > cclass(struct vars * v, /* context */ > const chr *startp, /* where the name starts */ > const chr *endp, /* just past the end of the name */ > int cases) /* case-independent? */ > function, and this function have comment "For the moment, assume that only > char codes < 256 can be in these classes" and it call pg_wc_isalpha like this: > for (i = 0; i <= UCHAR_MAX; i++) > { > if (pg_wc_isalpha((chr) i)) > addchr(cv, (chr) i); > } > UCHAR_MAX is 255
Hmm, you're right. I only tested that on Latin1 characters, for which it does work because those have Unicode points below 256. I'm not sure of a reasonable solution for the general case --- we certainly don't want this function iterating up to 2^21 or thereabouts. Your test case seems to be using KOI8 encoding, though, which doesn't have anything to do with UTF8 behavior. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers