PostgreSQL Source Code
git master
|
#include "catalog/pg_collation.h"
#include "common/unicode_case.h"
#include "common/unicode_category.h"
#include "utils/pg_locale.h"
Go to the source code of this file.
Data Structures | |
struct | pg_ctype_cache |
Macros | |
#define | PG_ISDIGIT 0x01 |
#define | PG_ISALPHA 0x02 |
#define | PG_ISALNUM (PG_ISDIGIT | PG_ISALPHA) |
#define | PG_ISUPPER 0x04 |
#define | PG_ISLOWER 0x08 |
#define | PG_ISGRAPH 0x10 |
#define | PG_ISPRINT 0x20 |
#define | PG_ISPUNCT 0x40 |
#define | PG_ISSPACE 0x80 |
Typedefs | |
typedef int(* | pg_wc_probefunc) (pg_wchar c) |
typedef struct pg_ctype_cache | pg_ctype_cache |
Enumerations | |
enum | PG_Locale_Strategy { PG_REGEX_STRATEGY_C , PG_REGEX_STRATEGY_BUILTIN , PG_REGEX_STRATEGY_LIBC_WIDE , PG_REGEX_STRATEGY_LIBC_1BYTE , PG_REGEX_STRATEGY_ICU } |
Functions | |
void | pg_set_regex_collation (Oid collation) |
static int | pg_wc_isdigit (pg_wchar c) |
static int | pg_wc_isalpha (pg_wchar c) |
static int | pg_wc_isalnum (pg_wchar c) |
static int | pg_wc_isword (pg_wchar c) |
static int | pg_wc_isupper (pg_wchar c) |
static int | pg_wc_islower (pg_wchar c) |
static int | pg_wc_isgraph (pg_wchar c) |
static int | pg_wc_isprint (pg_wchar c) |
static int | pg_wc_ispunct (pg_wchar c) |
static int | pg_wc_isspace (pg_wchar c) |
static pg_wchar | pg_wc_toupper (pg_wchar c) |
static pg_wchar | pg_wc_tolower (pg_wchar c) |
static bool | store_match (pg_ctype_cache *pcc, pg_wchar chr1, int nchrs) |
static struct cvec * | pg_ctype_get_cache (pg_wc_probefunc probefunc, int cclasscode) |
Variables | |
static PG_Locale_Strategy | pg_regex_strategy |
static pg_locale_t | pg_regex_locale |
static Oid | pg_regex_collation |
static const unsigned char | pg_char_properties [128] |
static pg_ctype_cache * | pg_ctype_cache_list = NULL |
#define PG_ISALNUM (PG_ISDIGIT | PG_ISALPHA) |
Definition at line 84 of file regc_pg_locale.c.
#define PG_ISALPHA 0x02 |
Definition at line 83 of file regc_pg_locale.c.
#define PG_ISDIGIT 0x01 |
Definition at line 82 of file regc_pg_locale.c.
#define PG_ISGRAPH 0x10 |
Definition at line 87 of file regc_pg_locale.c.
#define PG_ISLOWER 0x08 |
Definition at line 86 of file regc_pg_locale.c.
#define PG_ISPRINT 0x20 |
Definition at line 88 of file regc_pg_locale.c.
#define PG_ISPUNCT 0x40 |
Definition at line 89 of file regc_pg_locale.c.
#define PG_ISSPACE 0x80 |
Definition at line 90 of file regc_pg_locale.c.
#define PG_ISUPPER 0x04 |
Definition at line 85 of file regc_pg_locale.c.
typedef struct pg_ctype_cache pg_ctype_cache |
Definition at line 626 of file regc_pg_locale.c.
enum PG_Locale_Strategy |
Enumerator | |
---|---|
PG_REGEX_STRATEGY_C | |
PG_REGEX_STRATEGY_BUILTIN | |
PG_REGEX_STRATEGY_LIBC_WIDE | |
PG_REGEX_STRATEGY_LIBC_1BYTE | |
PG_REGEX_STRATEGY_ICU |
Definition at line 66 of file regc_pg_locale.c.
|
static |
Definition at line 686 of file regc_pg_locale.c.
References Assert, cvec::cclasscode, cvec::chrs, cvec::chrspace, pg_ctype_cache::collation, pg_ctype_cache::cv, free, malloc, MAX_SIMPLE_CHR, cvec::nchrs, pg_ctype_cache::next, cvec::nranges, pg_ctype_cache_list, pg_regex_collation, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, pg_ctype_cache::probefunc, cvec::ranges, cvec::rangespace, realloc, and store_match().
Referenced by cclasscvec().
void pg_set_regex_collation | ( | Oid | collation | ) |
Definition at line 232 of file regc_pg_locale.c.
References Assert, ereport, errcode(), errhint(), errmsg(), ERROR, GetDatabaseEncoding(), locale, OidIsValid, pg_newlocale_from_collation(), pg_regex_collation, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and PG_UTF8.
Referenced by pg_regcomp(), pg_regexec(), and pg_regprefix().
|
static |
Definition at line 359 of file regc_pg_locale.c.
References pg_locale_struct::info, isalnum_l, iswalnum_l, pg_locale_struct::lt, pg_char_properties, PG_ISALNUM, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isalnum().
Referenced by cclass_column_index(), cclasscvec(), and pg_wc_isword().
|
static |
Definition at line 332 of file regc_pg_locale.c.
References pg_locale_struct::info, isalpha_l, iswalpha_l, pg_locale_struct::lt, pg_char_properties, PG_ISALPHA, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isalpha().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 305 of file regc_pg_locale.c.
References pg_locale_struct::info, isdigit_l, iswdigit_l, pg_locale_struct::lt, pg_char_properties, PG_ISDIGIT, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isdigit().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 449 of file regc_pg_locale.c.
References pg_locale_struct::info, isgraph_l, iswgraph_l, pg_locale_struct::lt, pg_char_properties, PG_ISGRAPH, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isgraph().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 422 of file regc_pg_locale.c.
References pg_locale_struct::info, islower_l, iswlower_l, pg_locale_struct::lt, pg_char_properties, PG_ISLOWER, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_islower().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 476 of file regc_pg_locale.c.
References pg_locale_struct::info, isprint_l, iswprint_l, pg_locale_struct::lt, pg_char_properties, PG_ISPRINT, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isprint().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 503 of file regc_pg_locale.c.
References pg_locale_struct::info, ispunct_l, iswpunct_l, pg_locale_struct::lt, pg_char_properties, PG_ISPUNCT, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_ispunct().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 530 of file regc_pg_locale.c.
References pg_locale_struct::info, isspace_l, iswspace_l, pg_locale_struct::lt, pg_char_properties, PG_ISSPACE, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isspace().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 395 of file regc_pg_locale.c.
References pg_locale_struct::info, isupper_l, iswupper_l, pg_locale_struct::lt, pg_char_properties, PG_ISUPPER, pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, and pg_u_isupper().
Referenced by cclass_column_index(), and cclasscvec().
|
static |
Definition at line 386 of file regc_pg_locale.c.
References CHR, and pg_wc_isalnum().
Referenced by cclass_column_index(), and cclasscvec().
Definition at line 585 of file regc_pg_locale.c.
References pg_locale_struct::info, pg_locale_struct::lt, pg_ascii_tolower(), pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, tolower_l, towlower_l, and unicode_lowercase_simple().
Referenced by allcases(), casecmp(), and range().
Definition at line 557 of file regc_pg_locale.c.
References pg_locale_struct::info, pg_locale_struct::lt, pg_ascii_toupper(), pg_regex_locale, pg_regex_strategy, PG_REGEX_STRATEGY_BUILTIN, PG_REGEX_STRATEGY_C, PG_REGEX_STRATEGY_ICU, PG_REGEX_STRATEGY_LIBC_1BYTE, PG_REGEX_STRATEGY_LIBC_WIDE, toupper_l, towupper_l, and unicode_uppercase_simple().
Referenced by allcases(), and range().
|
static |
Definition at line 642 of file regc_pg_locale.c.
References assert, cvec::chrs, cvec::chrspace, pg_ctype_cache::cv, cvec::nchrs, cvec::nranges, cvec::ranges, cvec::rangespace, and realloc.
Referenced by pg_ctype_get_cache().
|
static |
Definition at line 92 of file regc_pg_locale.c.
Referenced by pg_wc_isalnum(), pg_wc_isalpha(), pg_wc_isdigit(), pg_wc_isgraph(), pg_wc_islower(), pg_wc_isprint(), pg_wc_ispunct(), pg_wc_isspace(), and pg_wc_isupper().
|
static |
Definition at line 636 of file regc_pg_locale.c.
Referenced by pg_ctype_get_cache().
|
static |
Definition at line 77 of file regc_pg_locale.c.
Referenced by pg_ctype_get_cache(), and pg_set_regex_collation().
|
static |
Definition at line 76 of file regc_pg_locale.c.
Referenced by pg_set_regex_collation(), pg_wc_isalnum(), pg_wc_isalpha(), pg_wc_isdigit(), pg_wc_isgraph(), pg_wc_islower(), pg_wc_isprint(), pg_wc_ispunct(), pg_wc_isspace(), pg_wc_isupper(), pg_wc_tolower(), and pg_wc_toupper().
|
static |
Definition at line 75 of file regc_pg_locale.c.
Referenced by pg_ctype_get_cache(), pg_set_regex_collation(), pg_wc_isalnum(), pg_wc_isalpha(), pg_wc_isdigit(), pg_wc_isgraph(), pg_wc_islower(), pg_wc_isprint(), pg_wc_ispunct(), pg_wc_isspace(), pg_wc_isupper(), pg_wc_tolower(), and pg_wc_toupper().