Updated on 2024-06-03 GMT+08:00

RESET

Description

Restores GUC parameters to their default values. The default values are parameter default values complied in the gaussdb.conf configuration file.

RESET is an alternative spelling for:

SET configuration_parameter TO DEFAULT;

Precautions

RESET and SET have the same transaction behavior. Their impact will be rolled back.

Syntax

RESET {configuration_parameter | CURRENT_SCHEMA | TIME ZONE | TRANSACTION ISOLATION LEVEL | SESSION AUTHORIZATION | ALL };

Parameters

  • configuration_parameter

    Specifies the name of a GUC parameter.

    Value range: GUC parameters. You can view them by running the SHOW ALL statement.

    Some parameters that viewed by SHOW ALL cannot be set by SET, for example, max_datanodes.

  • CURRENT_SCHEMA

    Specifies the current schema.

  • TIME ZONE

    Specifies the time zone.

  • TRANSACTION ISOLATION LEVEL

    Specifies the transaction isolation level.

  • SESSION AUTHORIZATION

    Specifies the current user identifier of the current session.

  • ALL

    Resets all GUC parameters to default values.

Examples

-- Set the time zone to Italy.
gaussdb=# SET timezone TO 'Europe/Rome';
-- View the current time zone.
gaussdb=# SHOW timezone;
  TimeZone   
-------------
 Europe/Rome
(1 row)

-- Set the time zone to the default value.
gaussdb=# RESET timezone;
-- View the current time zone.
gaussdb=# SHOW timezone;
 TimeZone 
----------
 PRC
(1 row)

-- The preceding SQL statement is equivalent to the following two SQL statements. Set the time zone to the default value.
gaussdb=# SET timezone TO DEFAULT;
gaussdb=# ALTER SESSION SET timezone to DEFAULT;

Helpful Links

SET and SHOW