summaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
AgeCommit message (Collapse)Author
2011-04-10Teach regular expression operators to honor collations.Tom Lane
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.
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-08-02Tweak a couple of macros in the regex code to suppress compiler warningsTom Lane
from "clang". The VERR changes make an assignment unconditional, which is probably easier to read/understand anyway, and one can hardly argue that it's worth shaving cycles off the case of reporting another error when one has already been detected. The INSIST change limits where that macro can be used, but not in a way that creates a problem for any existing call.
2010-02-01Change regexp engine's ccondissect/crevdissect routines to perform DFATom Lane
matching before recursing instead of after. The DFA match eliminates unworkable midpoint choices a lot faster than the recursive check, in most cases, so doing it first can speed things up; particularly in pathological cases such as recently exhibited by Michael Glaesemann. In addition, apply some cosmetic changes that were applied upstream (in the Tcl project) at the same time, in order to sync with upstream version 1.15 of regexec.c. Upstream apparently intends to backpatch this, so I will too. The pathological behavior could be unpleasant if encountered in the field, which seems to justify any risk of introducing new bugs. Tom Lane, reviewed by Donal K. Fellows of Tcl project
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-09-24Clean up possibly-uninitialized-variable warnings reported by gcc 4.x.Tom Lane
2005-07-10I made the patch that implements regexp_replace again.Bruce Momjian
The specification of this function is as follows. regexp_replace(source text, pattern text, replacement text, [flags text]) returns text Replace string that matches to regular expression in source text to replacement text. - pattern is regular expression pattern. - replacement is replace string that can use '\1'-'\9', and '\&'. '\1'-'\9': back reference to the n'th subexpression. '\&' : entire matched string. - flags can use the following values: g: global (replace all) i: ignore case When the flags is not specified, case sensitive, replace the first instance only. Atsushi Ogawa
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-08Another pgindent run with updated typedefs.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-02-05Replace regular expression package with Henry Spencer's latest versionTom Lane
(extracted from Tcl 8.4.1 release, as Henry still hasn't got round to making it a separate library). This solves a performance problem for multibyte, as well as upgrading our regexp support to match recent Tcl and nearly match recent Perl.
2002-11-08This patch removes a bunch of superfluous #include directives: ifBruce Momjian
postgres.h or c.h includes a system header (such as stdio.h or stdlib.h), there's no need to specifically include it in any of the .c files in the backend. Neil Conway
2002-08-29Remove #ifdef MULTIBYTE per hackers list discussion.Tatsuo Ishii
2002-06-11Implement SQL99 OVERLAY(). Allows substitution of a substring in a string.Thomas G. Lockhart
Implement SQL99 SIMILAR TO as a synonym for our existing operator "~". Implement SQL99 regular expression SUBSTRING(string FROM pat FOR escape). Extend the definition to make the FOR clause optional. Define textregexsubstr() to actually implement this feature. Update the regression test to include these new string features. All tests pass. Rename the regular expression support routines from "pg95_xxx" to "pg_xxx". Define CREATE CHARACTER SET in the parser per SQL99. No implementation yet.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-10-25Add do { ... } while (0) to more bad macros.Bruce Momjian
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-02-13Clean up portability problems in regexp package: change all routineTom Lane
definitions from K&R to ANSI C style, and fix broken assumption that int and long are the same datatype. This repairs problems observed on Alpha with regexps having between 32 and 63 states.
2000-01-19Removed MBFLAGS from makefiles since it's now done in include/config.h.Peter Eisentraut
1999-07-15Change #include's to use <> and "" as appropriate.Bruce Momjian
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-07-18Add auto-size to screen to \d? commands. Use UNION to show allBruce Momjian
\d? results in one query. Add \d? field search feature. Rename MB to MULTIBYTE.
1998-03-15From: [email protected]Marc G. Fournier
Included are patches intended for allowing PostgreSQL to handle multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and Mule internal code. With the MB patch you can use multi-byte character sets in regexp and LIKE. The encoding system chosen is determined at the compile time. To enable the MB extension, you need to define a variable "MB" in Makefile.global or in Makefile.custom. For further information please take a look at README.mb under doc directory. (Note that unlike "jp patch" I do not use modified GNU regexp any more. I changed Henry Spencer's regexp coming with PostgreSQL.)
1998-02-11Goodbye register keyword. Compiler knows better.Bruce Momjian
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.
1997-09-07Massive commit to run PGINDENT on all *.c and *.h files.Bruce Momjian
1996-11-08Compile and warning cleanupBruce Momjian
1996-09-20Various patches from Bryan that *should* clean up the compile problemsMarc G. Fournier
ppl are seeing with v2.0
1996-08-28Moved the include files to src/include/regexMarc G. Fournier
1996-07-09Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier