Updated on 2024-08-20 GMT+08:00

Viewing Parameters

GaussDB uses a set of default GUC parameters after it is installed. You can modify the GUC parameters to enable GaussDB to better fit your service scenarios and data volume.

Procedure

  1. Connect to the database. For details, see "Database Quick Start > Connecting to a Database > Using gsql to Connect to a Database" in Developer Guide.
  2. View the GUC parameter values in the database.

    • Method 1: Run the SHOW command.
      • View the value of a certain parameter.
        1
        gaussdb=# SHOW server_version;
        

        server_version indicates the database version.

      • View values of all parameters.
        1
        gaussdb=#  SHOW ALL;
        
    • Method 2: Query the pg_settings view.
      • View the value of a certain parameter.
        1
        gaussdb=# SELECT * FROM pg_settings WHERE NAME='server_version';
        
      • View values of all parameters.
        1
        gaussdb=# SELECT * FROM pg_settings;
        

Example

Check the character encoding type of the client.

1
2
3
4
5
gaussdb=# SHOW client_encoding;
 client_encoding 
----------------
 UTF8
(1 row)