From 9eb78beeae01f2f0ccafc5d66a2003ea7e3952f9 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Tue, 20 Mar 2007 05:45:00 +0000 Subject: Add three new regexp functions: regexp_matches, regexp_split_to_array, and regexp_split_to_table. These functions provide access to the capture groups resulting from a POSIX regular expression match, and provide the ability to split a string on a POSIX regular expression, respectively. Patch from Jeremy Drake; code review by Neil Conway, additional comments and suggestions from Tom and Peter E. This patch bumps the catversion, adds some regression tests, and updates the docs. --- src/include/utils/builtins.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/include/utils/builtins.h') diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 70c2142d8d4..b2a55bbbb98 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.289 2007/02/23 21:59:45 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.290 2007/03/20 05:45:00 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -478,6 +478,12 @@ extern Datum textregexsubstr(PG_FUNCTION_ARGS); extern Datum textregexreplace_noopt(PG_FUNCTION_ARGS); extern Datum textregexreplace(PG_FUNCTION_ARGS); extern Datum similar_escape(PG_FUNCTION_ARGS); +extern Datum regexp_matches(PG_FUNCTION_ARGS); +extern Datum regexp_matches_no_flags(PG_FUNCTION_ARGS); +extern Datum regexp_split_to_table(PG_FUNCTION_ARGS); +extern Datum regexp_split_to_table_no_flags(PG_FUNCTION_ARGS); +extern Datum regexp_split_to_array(PG_FUNCTION_ARGS); +extern Datum regexp_split_to_array_no_flags(PG_FUNCTION_ARGS); extern bool regex_flavor_is_basic(void); /* regproc.c */ -- cgit v1.2.3