From ad6bf716baa7c4c1d0c2fbece0344046e3ce1173 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 2 Apr 2008 14:42:56 +0000 Subject: Convert three more guc settings to enum type: default_transaction_isolation, session_replication_role and regex_flavor. --- src/backend/utils/adt/regexp.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'src/backend/utils/adt/regexp.c') diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 4a96a1bb70c..c6577fcfa39 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.79 2008/03/19 02:40:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.80 2008/04/02 14:42:56 mha Exp $ * * Alistair Crooks added the code for the regex caching * agc - cached the regular expressions used - there's a good chance @@ -40,7 +40,7 @@ /* GUC-settable flavor parameter */ -static int regex_flavor = REG_ADVANCED; +int regex_flavor = REG_ADVANCED; /* all the options of interest for regex functions */ @@ -414,33 +414,6 @@ parse_re_flags(pg_re_flags *flags, text *opts) } -/* - * assign_regex_flavor - GUC hook to validate and set REGEX_FLAVOR - */ -const char * -assign_regex_flavor(const char *value, bool doit, GucSource source) -{ - if (pg_strcasecmp(value, "advanced") == 0) - { - if (doit) - regex_flavor = REG_ADVANCED; - } - else if (pg_strcasecmp(value, "extended") == 0) - { - if (doit) - regex_flavor = REG_EXTENDED; - } - else if (pg_strcasecmp(value, "basic") == 0) - { - if (doit) - regex_flavor = REG_BASIC; - } - else - return NULL; /* fail */ - return value; /* OK */ -} - - /* * report whether regex_flavor is currently BASIC */ -- cgit v1.2.3