RESET {session variable}

On this page Carat arrow pointing down
Warning:
As of November 24, 2023, CockroachDB v22.1 is no longer supported. For more details, refer to the Release Support Policy.

The RESET statement resets a session variable to its default value for the client session.

Required privileges

No privileges are required to reset a session setting.

Synopsis

RESET SESSION session_var RESET_ALL ALL

Parameters

Parameter Description
session_var The name of the session variable.

Example

Tip:
You can use SET .. TO DEFAULT to reset a session variable as well.
icon/buttons/copy
> SET extra_float_digits = -10;
icon/buttons/copy
> SHOW extra_float_digits;
 extra_float_digits
--------------------
 -10
(1 row)
icon/buttons/copy
> SELECT random();
 random
---------
 0.20286
(1 row)
icon/buttons/copy
> RESET extra_float_digits;
icon/buttons/copy
> SHOW extra_float_digits;
 extra_float_digits
--------------------
 0
(1 row)
icon/buttons/copy
> SELECT random();
      random
-------------------
 0.561354028296755
(1 row)

See also


Yes No
On this page

Yes No