OSDN Git Service

Teach regular expression operators to honor collations.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 10 Apr 2011 22:02:17 +0000 (18:02 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 10 Apr 2011 22:03:09 +0000 (18:03 -0400)
commit1e16a8107db9a50435b39e09c6f9c52c45e63e1a
treebf2231fc078b46004c7814ba871e3c38c1d8d52d
parent210f95f1cd59c6fdfe0f84b922c19d8498ac377d
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.
12 files changed:
doc/src/sgml/charset.sgml
src/backend/libpq/hba.c
src/backend/regex/Makefile
src/backend/regex/regc_locale.c
src/backend/regex/regc_pg_locale.c [new file with mode: 0644]
src/backend/regex/regcomp.c
src/backend/regex/regexec.c
src/backend/tsearch/spell.c
src/backend/utils/adt/regexp.c
src/include/regex/regex.h
src/test/regress/expected/collate.linux.utf8.out
src/test/regress/sql/collate.linux.utf8.sql