Repair problem identified by Olivier Prenant: ALTER DATABASE SET search_path
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +2 −2 |
| src/backend/catalog/namespace.c | modified | +11 −4 |
| src/backend/commands/variable.c | modified | +18 −18 |
| src/backend/utils/adt/datetime.c | modified | +2 −2 |
| src/backend/utils/adt/pg_locale.c | modified | +10 −10 |
| src/backend/utils/adt/regexp.c | modified | +3 −2 |
| src/backend/utils/misc/guc.c | modified | +62 −57 |
| src/backend/utils/misc/README | modified | +16 −15 |
| src/include/access/xlog.h | modified | +1 −4 |
| src/include/catalog/namespace.h | modified | +1 −4 |
| src/include/commands/variable.h | modified | +12 −7 |
| src/include/utils/builtins.h | modified | +1 −5 |
| src/include/utils/datetime.h | modified | +1 −2 |
| src/include/utils/guc.h | modified | +30 −1 |
| src/include/utils/guc_tables.h | modified | +5 −5 |
| src/include/utils/pg_locale.h | modified | +8 −5 |
| src/interfaces/ecpg/pgtypeslib/dt.h | modified | +0 −1 |