postgresql_16:7.1.172.2 Parameters
PostgreSQL 16 > Reference > SQL Commands > SET > Parameters
SESSION
Specifies that the command takes effect for the current session. (This is the default if neither SESSION nor LOCAL appears.)
LOCAL
Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK, the session-level setting takes effect again. Issuing this outside of a transaction block emits a warning and otherwise has no effect.
*configuration_parameter*
Name of a settable run-time parameter. Available parameters are documented in (see postgresql_16:4.5) and below.
*value*
New value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter. DEFAULT can be written to specify resetting the parameter to its default value (that is, whatever value it would have had if no SET had been executed in the current session).
Besides the configuration parameters documented in (see postgresql_16:4.5), there are a few that can only be adjusted using the SET command or that have a special syntax: SCHEMA SET SCHEMA '*value*' is an alias for SET search_path TO *value*. Only one schema can be specified using this syntax. NAMES SET NAMES *value* is an alias for SET client_encoding TO *value*. SEED Sets the internal seed for the random number generator (the function random). Allowed values are floating-point numbers between -1 and 1 inclusive. The seed can also be set by invoking the function setseed: SELECT setseed(*value*); TIME ZONE SET TIME ZONE '*value*' is an alias for SET timezone TO '*value*'. The syntax SET TIME ZONE allows special syntax for the time zone specification. Here are examples of valid values: 'America/Los_Angeles' The time zone for Berkeley, California. 'Europe/Rome' The time zone for Italy. -7 The time zone 7 hours west from UTC (equivalent to PDT). Positive values are east from UTC. INTERVAL '-08:00' HOUR TO MINUTE The time zone 8 hours west from UTC (equivalent to PST). LOCAL DEFAULT Set the time zone to your local time zone (that is, the server's default value of timezone). Timezone settings given as numbers or intervals are internally translated to POSIX timezone syntax. For example, after SET TIME ZONE -7, SHOW TIME ZONE would report <-07>+07. Time zone abbreviations are not supported by SET; see (see postgresql_16:3.5.5.3) for more information about time zones.