Set
Set runtime variables.
Synopsis
SET variable { TO | = } { value | 'value' | DEFAULT } SET TIME ZONE { 'timezone' | LOCAL | DEFAULT }
Parameters
variableThe name of the runtime variable you are setting.
valueA new value for the specified variable. Use
DEFAULTto reset the variable to its default value.timezoneThe time zone of the client. The following are a few valid time zone values:
PST8PDTPacific Standard/Daylight Savings Time (GMT offset by 8 hours).
EST5EDTEastern Standard/Daylight Savings Time (GMT offset by 5 hours).
NZST13NZDTStandard/daylight savings time zone in New Zealand (GMT offset by 13 hours).
LOCALThe clause to set the time zone to the local system’s configured time zone.
DEFAULTThe clause to set a variable value, or a time zone value, to its default.
Results
SET VARIABLEThe message returned when a variable is successfully set.
ERROR: not a valid option name:(name)The error returned if you try to set a variable that doesn’t exist.
ERROR: permission deniedThe error returned if you do not have adequate permissions to alter the specified variable.
ERROR: name can only be set at start-upThe error returned if you attempt to set a variable that can only set set upon startup.
Description
Use the SET command to modify PostgreSQL runtime configuration
variables. The following variable can be altered:
CLIENT_ENCODINGThe multibyte client encoding scheme (if enabled in PostgreSQL).
DATESTYLEThis variable sets the date and time representation style. When setting this variable, you can choose ...