The SET command allows the changing of various POSTGRESQL
parameters. The changes remain in affect for the duration of the database connection.
Table shows various parameters that can be controlled with
DATESTYLE TO 'ISO'|'SQL'|'POSTGRES'|'EUROPEAN'|'US'|'NONEUROPEAN'
DATESTYLE controls the appearance of dates when printed in psql
as seen in table .
February 1, 1983
us or NONEUROPEAN
US or NONEUROPEAN
It allows control of the format (slashes, dashes, or year first), and
the convention of having the month first (US) or day first (European).
The command SET DATESTYLE TO 'SQL,US' would most likely be used by
users in the USA, while Europeans may prefer SET DATESTYLE
TO 'POSTGRES,EUROPEAN'. The ISO DATESTYLE is not affected by any of
the other options.
TIMEZONE defaults to the timezone of the server or the PGTZ
environment variable. The psql client may be in a different timezone,
and SET TIMEZONE allows this to be changed inside psql. TRANSACTION
ISOLATION will be covered in section . The other
options are for developer use during debugging sessions.
The SHOW command is used to display current database session parameters.
RESET allows session parameters to be reset to their default values.
Figure shows an example of this.6.6