84 #define PG_ISDIGIT 0x01
85 #define PG_ISALPHA 0x02
86 #define PG_ISALNUM (PG_ISDIGIT | PG_ISALPHA)
87 #define PG_ISUPPER 0x04
88 #define PG_ISLOWER 0x08
89 #define PG_ISGRAPH 0x10
90 #define PG_ISPRINT 0x20
91 #define PG_ISPUNCT 0x40
92 #define PG_ISSPACE 0x80
243 (
errcode(ERRCODE_INDETERMINATE_COLLATION),
244 errmsg(
"could not determine which collation to use for regular expression"),
245 errhint(
"Use the COLLATE clause to set the collation explicitly.")));
261 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
262 errmsg(
"nondeterministic collations are not supported for regular expressions")));
304 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
305 return iswdigit((wint_t)
c);
309 isdigit((
unsigned char)
c));
311 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
338 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
339 return iswalpha((wint_t)
c);
343 isalpha((
unsigned char)
c));
345 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
372 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
373 return iswalnum((wint_t)
c);
377 isalnum((
unsigned char)
c));
379 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
415 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
416 return iswupper((wint_t)
c);
420 isupper((
unsigned char)
c));
422 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
449 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
450 return iswlower((wint_t)
c);
454 islower((
unsigned char)
c));
456 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
483 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
484 return iswgraph((wint_t)
c);
488 isgraph((
unsigned char)
c));
490 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
517 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
518 return iswprint((wint_t)
c);
522 isprint((
unsigned char)
c));
524 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
551 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
552 return iswpunct((wint_t)
c);
556 ispunct((
unsigned char)
c));
558 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
585 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
586 return iswspace((wint_t)
c);
590 isspace((
unsigned char)
c));
592 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
623 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
624 return towupper((wint_t)
c);
631 return toupper((
unsigned char)
c);
634 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
665 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
666 return towlower((wint_t)
c);
673 return tolower((
unsigned char)
c);
676 if (
sizeof(
wchar_t) >= 4 ||
c <= (
pg_wchar) 0xFFFF)
818 #if MAX_SIMPLE_CHR >= 127
834 #if MAX_SIMPLE_CHR >= UCHAR_MAX
855 for (cur_chr = 0; cur_chr <= max_chr; cur_chr++)
857 if ((*probefunc) (cur_chr))
859 else if (nmatches > 0)
861 if (!
store_match(pcc, cur_chr - nmatches, nmatches))
868 if (!
store_match(pcc, cur_chr - nmatches, nmatches))
#define Assert(condition)
#define OidIsValid(objectId)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int GetDatabaseEncoding(void)
pg_locale_t pg_newlocale_from_collation(Oid collid)
bool lc_ctype_is_c(Oid collation)
bool pg_locale_deterministic(pg_locale_t locale)
unsigned char pg_ascii_tolower(unsigned char ch)
unsigned char pg_ascii_toupper(unsigned char ch)
static int pg_wc_islower(pg_wchar c)
static int pg_wc_isword(pg_wchar c)
static int pg_wc_isspace(pg_wchar c)
static pg_wchar pg_wc_tolower(pg_wchar c)
static int pg_wc_ispunct(pg_wchar c)
static pg_ctype_cache * pg_ctype_cache_list
static int pg_wc_isgraph(pg_wchar c)
static pg_wchar pg_wc_toupper(pg_wchar c)
static struct cvec * pg_ctype_get_cache(pg_wc_probefunc probefunc, int cclasscode)
static bool store_match(pg_ctype_cache *pcc, pg_wchar chr1, int nchrs)
static int pg_wc_isprint(pg_wchar c)
static int pg_wc_isalnum(pg_wchar c)
int(* pg_wc_probefunc)(pg_wchar c)
static int pg_wc_isdigit(pg_wchar c)
static PG_Locale_Strategy pg_regex_strategy
@ PG_REGEX_LOCALE_1BYTE_L
void pg_set_regex_collation(Oid collation)
static Oid pg_regex_collation
static pg_locale_t pg_regex_locale
static int pg_wc_isupper(pg_wchar c)
static int pg_wc_isalpha(pg_wchar c)
static const unsigned char pg_char_properties[128]
struct pg_ctype_cache pg_ctype_cache
pg_wc_probefunc probefunc
struct pg_ctype_cache * next
union pg_locale_struct::@151 info
pg_wchar unicode_uppercase_simple(pg_wchar code)
pg_wchar unicode_lowercase_simple(pg_wchar code)
bool pg_u_isspace(pg_wchar code)
bool pg_u_ispunct(pg_wchar code, bool posix)
bool pg_u_isprint(pg_wchar code)
bool pg_u_islower(pg_wchar code)
bool pg_u_isalpha(pg_wchar code)
bool pg_u_isalnum(pg_wchar code, bool posix)
bool pg_u_isupper(pg_wchar code)
bool pg_u_isdigit(pg_wchar code, bool posix)
bool pg_u_isgraph(pg_wchar code)