static PG_Locale_Strategy pg_regex_strategy;
static pg_locale_t pg_regex_locale;
-static Oid pg_regex_collation;
/*
* Hard-wired character properties for C locale
* pg_newlocale_from_collation().
*/
strategy = PG_REGEX_STRATEGY_C;
- collation = C_COLLATION_OID;
+ locale = 0;
}
else
{
*/
strategy = PG_REGEX_STRATEGY_C;
locale = 0;
- collation = C_COLLATION_OID;
}
else if (locale->provider == COLLPROVIDER_BUILTIN)
{
pg_regex_strategy = strategy;
pg_regex_locale = locale;
- pg_regex_collation = collation;
}
static int
typedef struct pg_ctype_cache
{
pg_wc_probefunc probefunc; /* pg_wc_isalpha or a sibling */
- Oid collation; /* collation this entry is for */
+ pg_locale_t locale; /* locale this entry is for */
struct cvec cv; /* cache entry contents */
struct pg_ctype_cache *next; /* chain link */
} pg_ctype_cache;
for (pcc = pg_ctype_cache_list; pcc != NULL; pcc = pcc->next)
{
if (pcc->probefunc == probefunc &&
- pcc->collation == pg_regex_collation)
+ pcc->locale == pg_regex_locale)
return &pcc->cv;
}
if (pcc == NULL)
return NULL;
pcc->probefunc = probefunc;
- pcc->collation = pg_regex_collation;
+ pcc->locale = pg_regex_locale;
pcc->cv.nchrs = 0;
pcc->cv.chrspace = 128;
pcc->cv.chrs = (chr *) malloc(pcc->cv.chrspace * sizeof(chr));