mirror of https://github.com/postgres/postgres
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.1 KiB
54 lines
1.1 KiB
.pgaw:Help.f.t insert end "SET" {bold} " will modify configuration parameters for variable during a session.
|
|
|
|
" {} "Synopsis" {bold} "
|
|
" {} "
|
|
SET variable \{ TO | = \} \{
|
|
'value' | DEFAULT \}
|
|
SET TIME ZONE \{ 'timezone' | LOCAL | DEFAULT \};
|
|
SET TRANSACTION ISOLATION LEVEL \{ READ COMMITTED | SERIALIZED \}
|
|
|
|
" {code} "Usage" {bold} "
|
|
" {} "
|
|
--Set the style of date to ISO:
|
|
--
|
|
SET DATESTYLE TO 'ISO';
|
|
|
|
|
|
|
|
--Enable GEQO for queries with 4 or more tables
|
|
--
|
|
SET GEQO ON=4;
|
|
|
|
|
|
|
|
--Set GEQO to default:
|
|
--
|
|
SET GEQO = DEFAULT;
|
|
|
|
|
|
|
|
--set the timezone for Berkeley, California:
|
|
SET TIME ZONE 'PST8PDT';
|
|
|
|
SELECT CURRENT_TIMESTAMP AS today;
|
|
|
|
today
|
|
----------------------
|
|
1998-03-31 07:41:21-08
|
|
|
|
|
|
|
|
--set the timezone for Italy:
|
|
SET TIME ZONE 'Europe/Rome';
|
|
|
|
SELECT CURRENT_TIMESTAMP AS today;
|
|
|
|
today
|
|
----------------------
|
|
1998-03-31 17:41:31+02
|
|
|
|
" {code} "Notes" {bold} "
|
|
|
|
The SET variable statement is a Postgres language extension.
|
|
|
|
Refer to SHOW and RESET to display or reset the current values. "
|
|
|