]> granicus.if.org Git - postgresql/commit
Fix regex_fixed_prefix() to cope reasonably well with regex patterns of the
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Jan 2007 22:39:26 +0000 (22:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 3 Jan 2007 22:39:26 +0000 (22:39 +0000)
commitd6061d2f31187795790e7e63d5d9730f9d78e7ea
tree15cd6bd72dbb5fece8ba93c0322e41059c788aee
parent9c88830ec495e76a4ebba4bde01989241e8d145a
Fix regex_fixed_prefix() to cope reasonably well with regex patterns of the
form '^(foo)$'.  Before, these could never be optimized into indexscans.
The recent changes to make psql and pg_dump generate such patterns (for \d
commands and -t and related switches, respectively) therefore represented
a big performance hit for people with large pg_class catalogs, as seen in
recent gripe from Erik Jones.  While at it, be more paranoid about
case-sensitivity checking in multibyte encodings, and fix some other
corner cases in which a regex might be interpreted too liberally.
src/backend/utils/adt/regexp.c
src/backend/utils/adt/selfuncs.c
src/include/utils/builtins.h