From 85690a0e1a71d751076066f6093ea5498440f72c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 3 Jan 2007 22:39:49 +0000 Subject: 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/include/utils/builtins.h | 3 ++- 1 file changed, 2 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 7de4ae5e359..1e5a4ba93fb 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.252 2004/12/31 22:03:45 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.252.4.1 2007/01/03 22:39:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -426,6 +426,7 @@ extern Datum texticregexeq(PG_FUNCTION_ARGS); extern Datum texticregexne(PG_FUNCTION_ARGS); extern Datum textregexsubstr(PG_FUNCTION_ARGS); extern Datum similar_escape(PG_FUNCTION_ARGS); +extern bool regex_flavor_is_basic(void); /* regproc.c */ extern Datum regprocin(PG_FUNCTION_ARGS); -- cgit v1.2.3