OSDN Git Service

Repair problem identified by Olivier Prenant: ALTER DATABASE SET search_path
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Jan 2004 19:04:40 +0000 (19:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Jan 2004 19:04:40 +0000 (19:04 +0000)
commit9bd681a5220186230e0ea0f718a71af7ebe4b560
tree3dddc229c62a5cc2b4da3ea50b2bc0b7256443d0
parent239760209b739d06e19ed4935776aeb89b6605f1
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.
17 files changed:
src/backend/access/transam/xlog.c
src/backend/catalog/namespace.c
src/backend/commands/variable.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/regexp.c
src/backend/utils/misc/README
src/backend/utils/misc/guc.c
src/include/access/xlog.h
src/include/catalog/namespace.h
src/include/commands/variable.h
src/include/utils/builtins.h
src/include/utils/datetime.h
src/include/utils/guc.h
src/include/utils/guc_tables.h
src/include/utils/pg_locale.h
src/interfaces/ecpg/pgtypeslib/dt.h