|
#define | DISCARD void /* for throwing values away */ |
|
#define | VS(x) ((void *)(x)) /* cast something to generic ptr */ |
|
#define | _POSIX2_RE_DUP_MAX 255 /* normally from <limits.h> */ |
|
#define | NOTREACHED 0 |
|
#define | DUPMAX _POSIX2_RE_DUP_MAX |
|
#define | DUPINF (DUPMAX+1) |
|
#define | REMAGIC 0xfed7 /* magic number for main struct */ |
|
#define | LATYPE_AHEAD_POS 03 /* positive lookahead */ |
|
#define | LATYPE_AHEAD_NEG 02 /* negative lookahead */ |
|
#define | LATYPE_BEHIND_POS 01 /* positive lookbehind */ |
|
#define | LATYPE_BEHIND_NEG 00 /* negative lookbehind */ |
|
#define | LATYPE_IS_POS(la) ((la) & 01) |
|
#define | LATYPE_IS_AHEAD(la) ((la) & 02) |
|
#define | FDEBUG(arglist) {} |
|
#define | MDEBUG(arglist) {} |
|
#define | UBITS (CHAR_BIT * sizeof(unsigned)) |
|
#define | BSET(uv, sn) ((uv)[(sn)/UBITS] |= (unsigned)1 << ((sn)%UBITS)) |
|
#define | ISBSET(uv, sn) ((uv)[(sn)/UBITS] & ((unsigned)1 << ((sn)%UBITS))) |
|
#define | NUM_CCLASSES 14 |
|
#define | MAX_COLOR 32767 /* max color (must fit in 'color' datatype) */ |
|
#define | COLORLESS (-1) /* impossible color */ |
|
#define | RAINBOW (-2) /* represents all colors except pseudocolors */ |
|
#define | WHITE 0 /* default color, parent of all others */ |
|
#define | NOSUB COLORLESS /* value of "sub" when no open subcolor */ |
|
#define | FREECOL 01 /* currently free */ |
|
#define | PSEUDO 02 /* pseudocolor, no real chars */ |
|
#define | COLMARK 04 /* temporary marker used in some functions */ |
|
#define | UNUSEDCOLOR(cd) ((cd)->flags & FREECOL) |
|
#define | CMMAGIC 0x876 |
|
#define | CDEND(cm) (&(cm)->cd[(cm)->max + 1]) |
|
#define | NINLINECDS ((size_t) 10) |
|
#define | GETCOLOR(cm, c) ((c) <= MAX_SIMPLE_CHR ? (cm)->locolormap[(c) - CHR_MIN] : pg_reg_getcolor(cm, c)) |
|
#define | freechain outchain /* we do not maintain "freechainRev" */ |
|
#define | ARCBATCHSIZE(n) ((n) * sizeof(struct arc) + offsetof(struct arcbatch, a)) |
|
#define | FIRSTABSIZE 64 |
|
#define | MAXABSIZE 1024 |
|
#define | FREESTATE (-1) |
|
#define | STATEBATCHSIZE(n) ((n) * sizeof(struct state) + offsetof(struct statebatch, s)) |
|
#define | FIRSTSBSIZE 32 |
|
#define | MAXSBSIZE 1024 |
|
#define | HASLACONS 01 /* uses lookaround constraints */ |
|
#define | MATCHALL 02 /* matches all strings of a range of lengths */ |
|
#define | HASCANTMATCH 04 /* contains CANTMATCH arcs */ |
|
#define | CNFA_NOPROGRESS 01 /* flag bit for a no-progress state */ |
|
#define | ZAPCNFA(cnfa) ((cnfa).nstates = 0) |
|
#define | NULLCNFA(cnfa) ((cnfa).nstates == 0) |
|
#define | REG_MAX_COMPILE_SPACE (500000 * (sizeof(struct state) + 4 * sizeof(struct arc))) |
|
#define | LONGER 01 /* prefers longer match */ |
|
#define | SHORTER 02 /* prefers shorter match */ |
|
#define | MIXED 04 /* mixed preference below */ |
|
#define | CAP 010 /* capturing parens here or below */ |
|
#define | BACKR 020 /* back reference here or below */ |
|
#define | BRUSE 040 /* is referenced by a back reference */ |
|
#define | INUSE 0100 /* in use in final tree */ |
|
#define | UPPROP (MIXED|CAP|BACKR) /* flags which should propagate up */ |
|
#define | LMIX(f) ((f)<<2) /* LONGER -> MIXED */ |
|
#define | SMIX(f) ((f)<<1) /* SHORTER -> MIXED */ |
|
#define | UP(f) (((f)&UPPROP) | (LMIX(f) & SMIX(f) & MIXED)) |
|
#define | MESSY(f) ((f)&(MIXED|CAP|BACKR)) |
|
#define | PREF(f) ((f)&(LONGER|SHORTER)) |
|
#define | PREF2(f1, f2) ((PREF(f1) != 0) ? PREF(f1) : PREF(f2)) |
|
#define | COMBINE(f1, f2) (UP((f1)|(f2)) | PREF2(f1, f2)) |
|
#define | STACK_TOO_DEEP(re) ((*((struct fns *) (re)->re_fns)->stack_too_deep) ()) |
|
#define | GUTSMAGIC 0xfed9 |
|
void pg_set_regex_collation |
( |
Oid |
collation | ) |
|
Definition at line 232 of file regc_pg_locale.c.
244 (
errcode(ERRCODE_INDETERMINATE_COLLATION),
245 errmsg(
"could not determine which collation to use for regular expression"),
246 errhint(
"Use the COLLATE clause to set the collation explicitly.")));
249 if (collation == C_COLLATION_OID)
257 collation = C_COLLATION_OID;
263 if (!
locale->deterministic)
265 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
266 errmsg(
"nondeterministic collations are not supported for regular expressions")));
276 collation = C_COLLATION_OID;
278 else if (
locale->provider == COLLPROVIDER_BUILTIN)
284 else if (
locale->provider == COLLPROVIDER_ICU)
#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)
static PG_Locale_Strategy pg_regex_strategy
@ PG_REGEX_STRATEGY_LIBC_WIDE
@ PG_REGEX_STRATEGY_BUILTIN
@ PG_REGEX_STRATEGY_LIBC_1BYTE
static Oid pg_regex_collation
static pg_locale_t pg_regex_locale
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().