mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.101 2002/03/31 06:26:32 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.102 2002/04/01 03:34:26 tgl Exp $
|
||||
*
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@ -24,10 +24,11 @@
|
||||
#include "catalog/catalog.h"
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/namespace.h"
|
||||
#include "catalog/pg_database.h"
|
||||
#include "catalog/pg_shadow.h"
|
||||
#include "commands/trigger.h"
|
||||
#include "commands/variable.h" /* for set_default_client_encoding() */
|
||||
#include "commands/variable.h"
|
||||
#include "mb/pg_wchar.h"
|
||||
#include "miscadmin.h"
|
||||
#include "storage/backendid.h"
|
||||
@ -372,11 +373,6 @@ InitPostgres(const char *dbname, const char *username)
|
||||
if (!bootstrap)
|
||||
ReverifyMyDatabase(dbname);
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
/* set default client encoding --- uses info from ReverifyMyDatabase */
|
||||
set_default_client_encoding();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Final phase of relation cache startup: write a new cache file
|
||||
* if necessary. This is done after ReverifyMyDatabase to avoid
|
||||
@ -384,6 +380,19 @@ InitPostgres(const char *dbname, const char *username)
|
||||
*/
|
||||
RelationCacheInitializePhase3();
|
||||
|
||||
/*
|
||||
* Initialize various default states that can't be set up until
|
||||
* we've selected the active user and done ReverifyMyDatabase.
|
||||
*/
|
||||
|
||||
/* set default namespace search path */
|
||||
InitializeSearchPath();
|
||||
|
||||
#ifdef MULTIBYTE
|
||||
/* set default client encoding --- uses info from ReverifyMyDatabase */
|
||||
set_default_client_encoding();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set up process-exit callback to do pre-shutdown cleanup. This should
|
||||
* be last because we want shmem_exit to call this routine before the exit
|
||||
|
Reference in New Issue
Block a user