From 838fe25a9532ab2e9b9b7517fec94e804cf3da81 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 1 Apr 2002 03:34:27 +0000 Subject: 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. --- doc/src/sgml/runtime.sgml | 67 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 9c118d2be25..43b6931fe18 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -1174,7 +1174,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' The default value for this parameter is - $libdir. If the value is set to an empty + '$libdir'. If the value is set to an empty string, the automatic path search is turned off. @@ -1189,6 +1189,69 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' + + SEARCH_PATH (string) + search_path + namespaces + + + This variable specifies the order in which namespaces are searched + when an object (table, datatype, function, etc) is referenced by a + simple name with no schema component. When there are objects of + identical names in different namespaces, the one found first + in the search path is used. An object that is not in any of the + namespaces in the search path can only be referenced by specifying + its containing namespace with a qualified (dotted) name. + + + + The value for search_path has to be a comma-separated + list of namespace (schema) names. If one of the list items is + the special value $user, then the namespace + having the same name as the SESSION_USER is substituted, if there + is such a namespace. (If not, $user is ignored.) + + + + The system catalog namespace, pg_catalog, is always + searched, whether it is mentioned in the path or not. If it is + mentioned in the path then it will be searched in the specified + order. If pg_catalog is not in the path then it will + be searched before searching any of the path items. + It should also be noted that the temporary-table namespace, + pg_temp_nnn, is implicitly searched before any of + these. + + + + When objects are created without specifying a particular target + namespace, they will be placed in the first namespace listed + in the search path, or in pg_catalog if the search + path list is empty. (Note that users do not normally have + permission to write in pg_catalog, so an empty search + path is not a very useful setting.) + + + + The default value for this parameter is + '$user, public' (where the second part will be + ignored if there is no namespace named public). + This supports shared use of a database (where no users + have private namespaces, and all share use of public), + private per-user namespaces, and combinations of these. Other + effects can be obtained by altering the default search path + setting, either globally or per-user. + + + + By default, a newly created database will contain a world-writable + namespace named public, but no private namespaces. + The administrator may choose to restrict permissions on + public or even remove it, if that suits his purposes. + + + + fsync -- cgit v1.2.3