ALTER DATABASE¶
Introduction¶
ALTER DATABASE – change an existing database
Synopsis¶
ALTER DATABASE <dbname> SET configuration_parameter { TO | = } { value | DEFAULT }
ALTER DATABASE <dbname> SET configuration_parameter FROM CURRENT
ALTER DATABASE <dbname> RESET configuration_parameter
ALTER DATABASE <dbname> RESET ALL
Parameters¶
configuration_parameter: The configuration parameter of hologres.
value: The value of the specified configuration parameter.
DEFAULT: The default value of the specified configuration parameter which is the system-wide default setting.
RESET: It is equivalent to set configuration parameter to DEFAULT which is the system-wide default setting.
RESET ALL: Reset all configuration parameters to DEFAULT.
SET FROM CURRENT : Save the session’s current value of the parameter as the database-specific value.
Example¶
set time zone to GMT+8 (Beijing standard time) which is 8 hours earlier than GMT.
ALTER DATABASE postgres SET timezone='GMT+8:00';