mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
From: t-ishii@sra.co.jp
Included are patches intended for allowing PostgreSQL to handle multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and Mule internal code. With the MB patch you can use multi-byte character sets in regexp and LIKE. The encoding system chosen is determined at the compile time. To enable the MB extension, you need to define a variable "MB" in Makefile.global or in Makefile.custom. For further information please take a look at README.mb under doc directory. (Note that unlike "jp patch" I do not use modified GNU regexp any more. I changed Henry Spencer's regexp coming with PostgreSQL.)
This commit is contained in:
@ -52,6 +52,7 @@ static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
|
||||
|
||||
#include <regex/regex.h>
|
||||
#include <regex/utils.h>
|
||||
#include <regex/regex2.h>
|
||||
|
||||
/* ========= begin header generated by ./mkh ========= */
|
||||
#ifdef __cplusplus
|
||||
@ -214,7 +215,11 @@ char *localbuf;
|
||||
struct rerr *r;
|
||||
|
||||
for (r = rerrs; r->code != 0; r++)
|
||||
#ifdef MB
|
||||
if (pg_char_and_wchar_strcmp(r->name, preg->re_endp) == 0)
|
||||
#else
|
||||
if (strcmp(r->name, preg->re_endp) == 0)
|
||||
#endif
|
||||
break;
|
||||
if (r->code == 0)
|
||||
return ("0");
|
||||
|
Reference in New Issue
Block a user