Contents / Previous / Next


PostgreSQL Parameters: SET, SHOW, and RESET

The SET command allows you to change various POSTGRESQL parameters.
The changes remain in effect for the duration of the database connection.
Two common parameters that can be controlled with SET are: DATESTYLE = 'ISO'|'POSTGRES'|'SQL'|'US'| 'NONEUROPEAN'|'EUROPEAN'|'GERMAN' TIMEZONE = 'value' See: Temporal Data Types


SHOW is used to display the current database session parameters.

RESET allows a session parameter to be reset to its default value.

Examples of these commands:

> SHOW DATESTYLE; NOTICE: DateStyle is ISO with US (NonEuropean) conventions SHOW VARIABLE > SET DATESTYLE TO 'SQL, EUROPEAN'; SET VARIABLE > SHOW DATESTYLE; NOTICE: DateStyle is SQL with European conventions SHOW VARIABLE > RESET DATESTYLE; RESET VARIABLE > SHOW DATESTYLE; NOTICE: DateStyle is ISO with US (NonEuropean) conventions SHOW VARIABLE