mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Create a new GUC variable search_path to control the namespace search
path. The default behavior if no per-user schemas are created is that all users share a 'public' namespace, thus providing behavior backwards compatible with 7.2 and earlier releases. Probably the semantics and default setting will need to be fine-tuned, but this is a start.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Support for grand unified configuration scheme, including SET
|
||||
* command, configuration file, and command line options.
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.63 2002/03/24 04:31:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.64 2002/04/01 03:34:26 tgl Exp $
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "utils/guc.h"
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "catalog/namespace.h"
|
||||
#include "commands/async.h"
|
||||
#include "fmgr.h"
|
||||
#include "libpq/auth.h"
|
||||
@@ -574,6 +575,11 @@ static struct config_string
|
||||
"$libdir", NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
"search_path", PGC_USERSET, PGC_S_DEFAULT, &namespace_search_path,
|
||||
"$user,public", check_search_path, assign_search_path
|
||||
},
|
||||
|
||||
{
|
||||
"krb_server_keyfile", PGC_POSTMASTER, PGC_S_DEFAULT, &pg_krb_server_keyfile,
|
||||
PG_KRB_SRVTAB, NULL, NULL
|
||||
@@ -899,7 +905,7 @@ set_config_option(const char *name, const char *value,
|
||||
int elevel;
|
||||
bool makeDefault;
|
||||
|
||||
if (context == PGC_SIGHUP)
|
||||
if (context == PGC_SIGHUP || source == PGC_S_DEFAULT)
|
||||
elevel = DEBUG1;
|
||||
else if (guc_session_init)
|
||||
elevel = INFO;
|
||||
@@ -1414,7 +1420,7 @@ ProcessGUCArray(ArrayType *array, GucSource source)
|
||||
ParseLongOption(s, &name, &value);
|
||||
if (!value)
|
||||
{
|
||||
elog(WARNING, "cannot to parse setting \"%s\"", name);
|
||||
elog(WARNING, "cannot parse setting \"%s\"", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user