SET variable { TO | = } { 'value' | DEFAULT }
SET TIME ZONE { 'timezone' | LOCAL | DEFAULT }
-SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
+SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
-
-variable
-
+ variable
Settable global parameter.
-
-value
-
+ value
New value of parameter.
-
-CLIENT_ENCODING | NAMES
-
+ CLIENT_ENCODING | NAMES
Sets the multi-byte client encoding. Parameters are:
-
-value
-
+ value
Sets the multi-byte client encoding to
-
-DEFAULT
-
+ DEFAULT
Sets the multi-byte client encoding to the default value.
-
-DateStyle
-
+ DateStyle
Set the date/time representation style. Affects the output format,
-
-ISO
-
+ ISO
use ISO 8601-style dates and times
-
-SQL
-
+ SQL
use Oracle/Ingres-style dates and times
-
-Postgres
-
+ Postgres
use traditional
Postgres format
-
-European
-
+ European
use dd/mm/yyyy for numeric date representations.
-
-NonEuropean
-
+ NonEuropean
use mm/dd/yyyy for numeric date representations.
-
-German
-
+ German
use dd.mm.yyyy for numeric date representations.
-
-US
-
+ US
same as 'NonEuropean'
-
-default
-
+ DEFAULT
restores the default values ('US,Postgres')
-
-SERVER_ENCODING
-
+ SERVER_ENCODING
Sets the multi-byte server encoding
-
-value
-
+ value
Sets the multi-byte server encoding.
-
-DEFAULT
-
+ DEFAULT
Sets the multi-byte server encoding.
-
-TIMEZONE
-
+ TIMEZONE
The possible values for timezone depends on your operating
-
-'PST8PDT'
-
+ 'PST8PDT'
set the timezone for California
-
-'Portugal'
-
+ 'Portugal'
set time zone for Portugal.
-
-'Europe/Rome'
-
+ 'Europe/Rome'
set time zone for Italy.
-
-DEFAULT
-
+ DEFAULT
set time zone to your local timezone
-
-TRANSACTION ISOLATION LEVEL
-
+ TRANSACTION ISOLATION LEVEL
Sets the isolation level for the current transaction.
-
-READ COMMITTED
-
+ READ COMMITTED
The current transaction queries read only rows committed
-
-SERIALIZABLE
-
+ SERIALIZABLE
The current transaction queries read only rows committed
-
-COST_HEAP
-
+ COST_HEAP
Sets the default cost of a heap scan for use by the optimizer.
-
-float4
-
+ float4
Set the cost of a heap scan to the specified floating point value.
-
-DEFAULT
-
+ DEFAULT
Sets the cost of a heap scan to the default value.
-
-COST_INDEX
-
+ COST_INDEX
Sets the default cost of an index scan for use by the optimizer.
-
-float4
-
+ float4
Set the cost of an index scan to the specified floating point value.
-
-DEFAULT
-
+ DEFAULT
Sets the cost of an index scan to the default value.
-
-GEQO
-
+ GEQO
Sets the threshold for using the genetic optimizer algorithm.
-
+
-
-ON
-
+ ON
enables the genetic optimizer algorithm
+
-
-ON=#
-
+ ON=#
Takes an integer argument to enable the genetic optimizer algorithm
+
-
-OFF
-
+ OFF
disables the genetic optimizer algorithm.
-
-DEFAULT
-
+ DEFAULT
Equivalent to specifying SET GEQO='ON'
-
-KSQO
-
+ KSQO
Key Set Query Optimizer forces the query optimizer
-
-ON
-
+ ON
enables this optimization.
-
-OFF
-
+ OFF
disables this optimization.
-
-DEFAULT
-
+ DEFAULT
Equivalent to specifying SET KSQO='OFF'.
-
-SET VARIABLE
-
+
+SET VARIABLE
+
Message returned if successfully.
-
-WARN: Bad value for variable (value)
-
+
+WARN: Bad value for variable (value)
+
If the command fails to set the specified variable.
Set the style of date to ISO:
- SET DATESTYLE TO 'ISO';
+SET DATESTYLE TO 'ISO';
Enable GEQO for queries with 4 or more tables:
- SET GEQO ON=4;
+SET GEQO ON=4;
Set GEQO to default:
- SET GEQO = DEFAULT;
+SET GEQO = DEFAULT;
Set the timezone for Berkeley, California:
- SET TIME ZONE 'PST8PDT';
- SELECT CURRENT_TIMESTAMP AS today;
+SET TIME ZONE 'PST8PDT';
+SELECT CURRENT_TIMESTAMP AS today;
today
----------------------
Set the timezone for Italy:
- SET TIME ZONE 'Europe/Rome';
- SELECT CURRENT_TIMESTAMP AS today;
+SET TIME ZONE 'Europe/Rome';
+SELECT CURRENT_TIMESTAMP AS today;
today
----------------------
SQL92
- There is no
+ There is no general
SET variable
- in
SQL92 (except for SET TRANSACTION ISOLATION LEVEL).
-
+ in
SQL92 (with the exception of
+ SET TRANSACTION ISOLATION LEVEL).
+
The
SQL92 syntax for
SET TIME ZONE
is slightly different,
allowing only a single integer value for time zone specification:
- <programlisting>
- SET TIME ZONE { interval_value_expression | LOCAL }
- programlisting>
+ <synopsis>
+SET TIME ZONE { interval_value_expression | LOCAL }
+ synopsis>
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
-sgml-local-catalogs:"/usr/lib/sgml/CATALOG"
+sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->