All Products
Search
Document Center

Hologres:HG_UPDATE_DATABASE_PROPERTY

Last Updated:Dec 02, 2024

You can use the HG_UPDATE_DATABASE_PROPERTY function to modify the properties of a database. This topic describes how to use the HG_UPDATE_DATABASE_PROPERTY function in Hologres.

Limits

To use the HG_UPDATE_DATABASE_PROPERTY function, you must be the superuser of an instance or the owner of a database.

Overview

The following table describes the database properties that you can modify by using the HG_UPDATE_DATABASE_PROPERTY function.
PropertyDescription
default_table_groupSpecify whether a table group is the default table group.
Note This property is supported by Hologres V0.10 or later.
shard_countSet the number of shards for the default table group. This property is not recommended.

Syntax

CALL HG_UPDATE_DATABASE_PROPERTY ( 'property', 'value' );
The following table describes the parameters of the HG_UPDATE_DATABASE_PROPERTY function.
ParameterDescription
propertyThe name of the property.
valueThe value of the property.

Examples

Execute the following statement to set the table group named TG120 as the default table group:
CALL HG_UPDATE_DATABASE_PROPERTY ( 'default_table_group', 'TG120' );