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

Other Syntax List

In addition to DCL, DDL, and DML syntax, GaussDB also provides syntax for other functions.

Shutting Down The Current Node

GaussDB allows users to run the shutdown command to shut down the current database node. For details, see SHUTDOWN.

SQL Statements Related to Bucket Scale-out

GaussDB supports statements used by the scale-out tool to notify the kernel of the buckets that have been migrated. For details, see MARK BUCKETS.

Clearing Database Connections

GaussDB supports statements for clearing database connections. For details, see CLEAN CONNECTION.

Showing an Execution Plan of an SQL Statement

GaussDB provides statements for showing an execution plan of an SQL statement. For details, see EXPLAIN.

Storage Execution Plan

GaussDB provides statements for storing query execution plan information in the PLAN_TABLE table. For details, see EXPLAIN PLAN.

Prediction:

GaussDB provides statements for using a trained model to perform inference tasks. For details, see PREDICT BY.

Creating a Prepared Statement

GaussDB provides statements for creating a prepared statement. For details, see PREPARE.

SQL Statements Related to Transactions

Table 1 SQL statements related to transactions

Function

SQL Statement

Rolling back the current transaction and canceling the changes in the transaction

ABORT

ROLLBACK

Starting a transaction

BEGIN

SET TRANSACTION

START TRANSACTION

Setting transaction log checkpoints

CHECKPOINT

Committing the current transaction

COMMIT | END

Committing a prepared two-phase transaction

COMMIT PREPARED

Preparing the current transaction for two-phase commit

PREPARE TRANSACTION

Deleting a savepoint previously defined for the current transaction

RELEASE SAVEPOINT

Canceling a transaction ready for two-phase commit

ROLLBACK PREPARED

Rolling back to a savepoint

ROLLBACK TO SAVEPOINT

Creating a savepoint in the current transaction

SAVEPOINT

Setting constraint check timing for the current transaction

SET CONSTRAINTS

Modifying, Displaying, and Restoring a Runtime Parameter

Table 2 SQL statements for modifying, displaying, and restoring a runtime parameter

Function

SQL Statement

Modifying a runtime parameter

SET

Showing the current value of a runtime parameter

SHOW

Restoring a runtime parameter to the default value

RESET

Setting a User Identifier

Table 3 SQL statements for setting a user identifier

Function

SQL Statement

Setting the current user identifier of the current session

SET ROLE

Setting the session user identifier and the current user identifier of the current session to a specified user

SET SESSION AUTHORIZATION