From 9bd681a5220186230e0ea0f718a71af7ebe4b560 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 19 Jan 2004 19:04:40 +0000 Subject: Repair problem identified by Olivier Prenant: ALTER DATABASE SET search_path should not be too eager to reject paths involving unknown schemas, since it can't really tell whether the schemas exist in the target database. (Also, when reading pg_dumpall output, it could be that the schemas don't exist yet, but eventually will.) ALTER USER SET has a similar issue. So, reduce the normal ERROR to a NOTICE when checking search_path values for these commands. Supporting this requires changing the API for GUC assign_hook functions, which causes the patch to touch a lot of places, but the changes are conceptually trivial. --- src/backend/utils/adt/regexp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 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 63b14266af1..78944a57951 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.50 2003/11/29 19:51:59 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/regexp.c,v 1.51 2004/01/19 19:04:40 tgl Exp $ * * Alistair Crooks added the code for the regex caching * agc - cached the regular expressions used - there's a good chance @@ -32,6 +32,7 @@ #include "regex/regex.h" #include "mb/pg_wchar.h" #include "utils/builtins.h" +#include "utils/guc.h" /* GUC-settable flavor parameter */ @@ -229,7 +230,7 @@ RE_compile_and_execute(text *text_re, unsigned char *dat, int dat_len, */ const char * assign_regex_flavor(const char *value, - bool doit, bool interactive) + bool doit, GucSource source) { if (strcasecmp(value, "advanced") == 0) { -- cgit v1.2.3