mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Teach regular expression operators to honor collations.
This involves getting the character classification and case-folding functions in the regex library to use the collations infrastructure. Most of this work had been done already in connection with the upper/lower and LIKE logic, so it was a simple matter of transposition. While at it, split out these functions into a separate source file regc_pg_locale.c, so that they can be correctly labeled with the Postgres project's license rather than the Scriptics license. These functions are 100% Postgres-written code whereas what remains in regc_locale.c is still mostly not ours, so lumping them both under the same copyright notice was getting more and more misleading.
This commit is contained in:
@ -192,6 +192,9 @@ pg_regexec(regex_t *re,
|
||||
if (re->re_csize != sizeof(chr))
|
||||
return REG_MIXED;
|
||||
|
||||
/* Initialize locale-dependent support */
|
||||
pg_set_regex_collation(re->re_collation);
|
||||
|
||||
/* setup */
|
||||
v->re = re;
|
||||
v->g = (struct guts *) re->re_guts;
|
||||
|
Reference in New Issue
Block a user