summaryrefslogtreecommitdiff
path: root/src/backend/regex/README
diff options
context:
space:
mode:
authorTom Lane2013-04-09 05:05:55 +0000
committerTom Lane2013-04-09 05:06:54 +0000
commit3ccae48f44d993351e1f881761bd6c556ebd6638 (patch)
treeec365a856f56aae32745644164d0a8b5889ee5fd /src/backend/regex/README
parente60d20a35e436cef3c454bfeab34d8ea71b54910 (diff)
Support indexing of regular-expression searches in contrib/pg_trgm.
This works by extracting trigrams from the given regular expression, in generally the same spirit as the previously-existing support for LIKE searches, though of course the details are far more complicated. Currently, only GIN indexes are supported. We might be able to make it work with GiST indexes later. The implementation includes adding API functions to backend/regex/ to provide a view of the search NFA created from a regular expression. These functions are meant to be generic enough to be supportable in a standalone version of the regex library, should that ever happen. Alexander Korotkov, reviewed by Heikki Linnakangas and Tom Lane
Diffstat (limited to 'src/backend/regex/README')
-rw-r--r--src/backend/regex/README9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/regex/README b/src/backend/regex/README
index c5d21e8c99d..29521c6636f 100644
--- a/src/backend/regex/README
+++ b/src/backend/regex/README
@@ -7,8 +7,8 @@ So this file is an attempt to reverse-engineer some docs.
General source-file layout
--------------------------
-There are five separately-compilable source files, each exposing exactly
-one exported function:
+There are six separately-compilable source files, five of which expose
+exactly one exported function apiece:
regcomp.c: pg_regcomp
regexec.c: pg_regexec
regerror.c: pg_regerror
@@ -19,6 +19,9 @@ library version from any similar one that might be present on a particular
system. They'd need to be removed or replaced in any standalone version
of the library.)
+The sixth file, regexport.c, exposes multiple functions that allow extraction
+of info about a compiled regex (see regexport.h).
+
There are additional source files regc_*.c that are #include'd in regcomp,
and similarly additional source files rege_*.c that are #include'd in
regexec. This was done to avoid exposing internal symbols globally;
@@ -45,6 +48,7 @@ regexec.c Top-level regex execution code
rege_dfa.c DFA creation and execution
regerror.c pg_regerror: generate text for a regex error code
regfree.c pg_regfree: API to free a no-longer-needed regex_t
+regexport.c Functions for extracting info from a regex_t
regprefix.c Code for extracting a common prefix from a regex_t
The locale-specific code is concerned primarily with case-folding and with
@@ -56,6 +60,7 @@ The header files for the library are in src/include/regex/:
regcustom.h Customizes library for particular application
regerrs.h Error message list
regex.h Exported API
+regexport.h Exported API for regexport.c
regguts.h Internals declarations