| The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group Paperback (6"x9"), 274 pages ISBN 9781906966072 RRP £9.95 ($14.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
4.10.1 Statement Behavior
search_path(string)-
This variable specifies the order in which schemas are searched
when an object (table, data type, function, etc.) is referenced by a
simple name with no schema specified. When there are objects of
identical names in different schemas, the one found first
in the search path is used. An object that is not in any of the
schemas in the search path can only be referenced by specifying
its containing schema with a qualified (dotted) name.
The value for
search_pathmust be a comma-separated list of schema names. If one of the list items is the special value$user, then the schema having the name returned bySESSION_USERis substituted, if there is such a schema. (If not,$useris ignored.) The system catalog schema,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. Ifpg_catalogis not in the path then it will be searched before searching any of the path items. Likewise, the current session's temporary-table schema,pg_temp_nnn, is always searched if it exists. It can be explicitly listed in the path by using the aliaspg_temp. If it is not listed in the path then it is searched first (even beforepg_catalog). However, the temporary schema is only searched for relation (table, view, sequence, etc) and data type names. It is never searched for function or operator names. When objects are created without specifying a particular target schema, they will be placed in the first schema listed in the search path. An error is reported if the search path is empty. The default value for this parameter is'"$user", public'(where the second part will be ignored if there is no schema namedpublic). This supports shared use of a database (where no users have private schemas, and all share use ofpublic), private per-user schemas, and combinations of these. Other effects can be obtained by altering the default search path setting, either globally or per-user. The current effective value of the search path can be examined via the SQL functioncurrent_schemas(). This is not quite the same as examining the value ofsearch_path, sincecurrent_schemas()shows how the items appearing insearch_pathwere resolved. For more information on schema handling, see Volume 1A: 3.7 Schemas. default_tablespace(string)-
This variable specifies the default tablespace in which to create
objects (tables and indexes) when a
CREATEcommand does not explicitly specify a tablespace. The value is either the name of a tablespace, or an empty string to specify using the default tablespace of the current database. If the value does not match the name of any existing tablespace, PostgreSQL will automatically use the default tablespace of the current database. If a nondefault tablespace is specified, the user must haveCREATEprivilege for it, or creation attempts will fail. This variable is not used for temporary tables; for them,temp_tablespacesis consulted instead. For more information on tablespaces, see section 7.6 Tablespaces. temp_tablespaces(string)-
This variable specifies tablespaces in which to create temporary
objects (temp tables and indexes on temp tables) when a
CREATEcommand does not explicitly specify a tablespace. Temporary files for purposes such as sorting large data sets are also created in these tablespaces. The value is a list of names of tablespaces. When there is more than one name in the list, PostgreSQL chooses a random member of the list each time a temporary object is to be created; except that within a transaction, successively created temporary objects are placed in successive tablespaces from the list. If the selected element of the list is an empty string, PostgreSQL will automatically use the default tablespace of the current database instead. Whentemp_tablespacesis set interactively, specifying a nonexistent tablespace is an error, as is specifying a tablespace for which the user does not haveCREATEprivilege. However, when using a previously set value, nonexistent tablespaces are ignored, as are tablespaces for which the user lacksCREATEprivilege. In particular, this rule applies when using a value set in ‘postgresql.conf’. The default value is an empty string, which results in all temporary objects being created in the default tablespace of the current database. See alsodefault_tablespace. check_function_bodies(boolean)-
This parameter is normally on. When set to
off, it disables validation of the function body string duringCREATE FUNCTION. Disabling validation is occasionally useful to avoid problems such as forward references when restoring function definitions from a dump. default_transaction_isolation(enum)-
Each SQL transaction has an isolation level, which can be
either “read uncommitted”, “read
committed”, “repeatable read”, or
“serializable”. This parameter controls the
default isolation level of each new transaction. The default
is “read committed”.
Consult Volume 1A: 11 Concurrency Control and
SET TRANSACTIONfor more information. default_transaction_read_only(boolean)-
A read-only SQL transaction cannot alter non-temporary tables.
This parameter controls the default read-only status of each new
transaction. The default is
off(read/write). ConsultSET TRANSACTIONfor more information. session_replication_role(enum)-
Controls firing of replication-related triggers and rules for the
current session. Setting this variable requires
superuser privilege and results in discarding any previously cached
query plans. Possible values are
origin(the default),replicaandlocal. SeeALTER TABLEfor more information. statement_timeout(integer)-
Abort any statement that takes over the specified number of
milliseconds, starting from the time the command arrives at the server
from the client. If
log_min_error_statementis set toERRORor lower, the statement that timed out will also be logged. A value of zero (the default) turns this off. Settingstatement_timeoutin ‘postgresql.conf’ is not recommended because it affects all sessions. vacuum_freeze_table_age(integer)-
VACUUMperforms a whole-table scan if the table'spg_class.relfrozenxidfield has reached the age specified by this setting. The default is 150 million transactions. Although users can set this value anywhere from zero to one billion,VACUUMwill silently limit the effective value to 95% ofautovacuum_freeze_max_age, so that a periodical manualVACUUMhas a chance to run before an anti-wraparound autovacuum is launched for the table. For more information see section 9.1.4 Preventing Transaction ID Wraparound Failures. vacuum_freeze_min_age(integer)-
Specifies the cutoff age (in transactions) that
VACUUMshould use to decide whether to replace transaction IDs withFrozenXIDwhile scanning a table. The default is 50 million transactions. Although users can set this value anywhere from zero to one billion,VACUUMwill silently limit the effective value to half the value ofautovacuum_freeze_max_age, so that there is not an unreasonably short time between forced autovacuums. For more information see section 9.1.4 Preventing Transaction ID Wraparound Failures. bytea_output(enum)-
Sets the output format for values of type
bytea. Valid values arehex(the default) andescape(the traditional PostgreSQL format). See Volume 1A: 6.4 Binary Data Types for more information. Thebyteatype always accepts both formats on input, regardless of this setting. xmlbinary(enum)-
Sets how binary values are to be encoded in XML. This applies
for example when
byteavalues are converted to XML by the functionsxmlelementorxmlforest. Possible values arebase64andhex, which are both defined in the XML Schema standard. The default isbase64. For further information about XML-related functions, see Volume 1A: 7.14 XML Functions. The actual choice here is mostly a matter of taste, constrained only by possible restrictions in client applications. Both methods support all possible values, although the hex encoding will be somewhat larger than the base64 encoding. xmloption(enum)-
Sets whether
DOCUMENTorCONTENTis implicit when converting between XML and character string values. See Volume 1A: 6.13 XML Type for a description of this. Valid values areDOCUMENTandCONTENT. The default isCONTENT. According to the SQL standard, the command to set this option isSET XML OPTION { DOCUMENT | CONTENT };This syntax is also available in PostgreSQL.
| ISBN 9781906966072 | The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide | See the print edition |