File tree 1 file changed +19
-15
lines changed 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -261,29 +261,33 @@ pg_set_regex_collation(Oid collation)
261
261
(errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
262
262
errmsg ("nondeterministic collations are not supported for regular expressions" )));
263
263
264
+ if (pg_regex_locale && pg_regex_locale -> provider == COLLPROVIDER_BUILTIN )
265
+ {
266
+ Assert (GetDatabaseEncoding () == PG_UTF8 );
267
+ pg_regex_strategy = PG_REGEX_BUILTIN ;
268
+ }
264
269
#ifdef USE_ICU
265
- if (pg_regex_locale && pg_regex_locale -> provider == COLLPROVIDER_ICU )
270
+ else if (pg_regex_locale && pg_regex_locale -> provider == COLLPROVIDER_ICU )
271
+ {
266
272
pg_regex_strategy = PG_REGEX_LOCALE_ICU ;
267
- else
273
+ }
268
274
#endif
269
- if ( GetDatabaseEncoding () == PG_UTF8 )
275
+ else
270
276
{
271
- if (pg_regex_locale )
277
+ if (GetDatabaseEncoding () == PG_UTF8 )
272
278
{
273
- if (pg_regex_locale -> provider == COLLPROVIDER_BUILTIN )
274
- pg_regex_strategy = PG_REGEX_BUILTIN ;
275
- else
279
+ if (pg_regex_locale )
276
280
pg_regex_strategy = PG_REGEX_LOCALE_WIDE_L ;
281
+ else
282
+ pg_regex_strategy = PG_REGEX_LOCALE_WIDE ;
277
283
}
278
284
else
279
- pg_regex_strategy = PG_REGEX_LOCALE_WIDE ;
280
- }
281
- else
282
- {
283
- if (pg_regex_locale )
284
- pg_regex_strategy = PG_REGEX_LOCALE_1BYTE_L ;
285
- else
286
- pg_regex_strategy = PG_REGEX_LOCALE_1BYTE ;
285
+ {
286
+ if (pg_regex_locale )
287
+ pg_regex_strategy = PG_REGEX_LOCALE_1BYTE_L ;
288
+ else
289
+ pg_regex_strategy = PG_REGEX_LOCALE_1BYTE ;
290
+ }
287
291
}
288
292
289
293
pg_regex_collation = collation ;
You can’t perform that action at this time.
0 commit comments