diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-01 03:34:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-01 03:34:27 +0000 |
commit | 838fe25a9532ab2e9b9b7517fec94e804cf3da81 (patch) | |
tree | 5d71f950bc362497a57e4a5a375907a41325aec4 /src/backend/utils/init/postinit.c | |
parent | 6df395f63a3f4be10b8f5b81dea1b426021ce5ce (diff) | |
download | postgresql-838fe25a9532ab2e9b9b7517fec94e804cf3da81.tar.gz postgresql-838fe25a9532ab2e9b9b7517fec94e804cf3da81.zip |
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.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r-- | src/backend/utils/init/postinit.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 9cd5b194d92..0d36d70bea8 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -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 @@ -385,6 +381,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 * callbacks that are registered by buffer manager, lock manager, etc. |