All Products
Search
Document Center

Hologres:ALTER DATABASE

Last Updated:Mar 25, 2026

The ALTER DATABASE statement modifies a database.

Syntax

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
ParameterDescription
configuration_parameterA Hologres configuration parameter.
valueThe new value for the configuration parameter.
DEFAULTSets the configuration parameter to its default value.
RESETResets the specified configuration parameter.
RESET ALLResets all configuration parameters for the database.
SET FROM CURRENTSets the configuration parameter to the value of the current session.

Examples

The following examples set the time zone to GMT+8:00.

Set the time zone for the current session only:

SET timezone='GMT+8:00';

Set the time zone at the database level so all new sessions in the postgres database use GMT+8:00 by default:

ALTER DATABASE postgres SET timezone='GMT+8:00';