@@ -74,7 +74,6 @@ typedef enum
74
74
75
75
static PG_Locale_Strategy pg_regex_strategy ;
76
76
static pg_locale_t pg_regex_locale ;
77
- static Oid pg_regex_collation ;
78
77
79
78
/*
80
79
* Hard-wired character properties for C locale
@@ -254,7 +253,7 @@ pg_set_regex_collation(Oid collation)
254
253
* pg_newlocale_from_collation().
255
254
*/
256
255
strategy = PG_REGEX_STRATEGY_C ;
257
- collation = C_COLLATION_OID ;
256
+ locale = 0 ;
258
257
}
259
258
else
260
259
{
@@ -273,7 +272,6 @@ pg_set_regex_collation(Oid collation)
273
272
*/
274
273
strategy = PG_REGEX_STRATEGY_C ;
275
274
locale = 0 ;
276
- collation = C_COLLATION_OID ;
277
275
}
278
276
else if (locale -> provider == COLLPROVIDER_BUILTIN )
279
277
{
@@ -298,7 +296,6 @@ pg_set_regex_collation(Oid collation)
298
296
299
297
pg_regex_strategy = strategy ;
300
298
pg_regex_locale = locale ;
301
- pg_regex_collation = collation ;
302
299
}
303
300
304
301
static int
@@ -628,7 +625,7 @@ typedef int (*pg_wc_probefunc) (pg_wchar c);
628
625
typedef struct pg_ctype_cache
629
626
{
630
627
pg_wc_probefunc probefunc ; /* pg_wc_isalpha or a sibling */
631
- Oid collation ; /* collation this entry is for */
628
+ pg_locale_t locale ; /* locale this entry is for */
632
629
struct cvec cv ; /* cache entry contents */
633
630
struct pg_ctype_cache * next ; /* chain link */
634
631
} pg_ctype_cache ;
@@ -697,7 +694,7 @@ pg_ctype_get_cache(pg_wc_probefunc probefunc, int cclasscode)
697
694
for (pcc = pg_ctype_cache_list ; pcc != NULL ; pcc = pcc -> next )
698
695
{
699
696
if (pcc -> probefunc == probefunc &&
700
- pcc -> collation == pg_regex_collation )
697
+ pcc -> locale == pg_regex_locale )
701
698
return & pcc -> cv ;
702
699
}
703
700
@@ -708,7 +705,7 @@ pg_ctype_get_cache(pg_wc_probefunc probefunc, int cclasscode)
708
705
if (pcc == NULL )
709
706
return NULL ;
710
707
pcc -> probefunc = probefunc ;
711
- pcc -> collation = pg_regex_collation ;
708
+ pcc -> locale = pg_regex_locale ;
712
709
pcc -> cv .nchrs = 0 ;
713
710
pcc -> cv .chrspace = 128 ;
714
711
pcc -> cv .chrs = (chr * ) malloc (pcc -> cv .chrspace * sizeof (chr ));
0 commit comments