AST

Function

Verifies the openGauss syntax tree.

Checks whether the statements following the AST syntax support the generation of the openGauss syntax tree.

Precautions

If the verification fails, a syntax parsing error is thrown. If the verification is successful, no command output is displayed.

Syntax

AST [ STMT ] ;

Parameter Description

  • STMT

Any type of SQL statements and stored procedure statements are supported.

Examples

-- Verify table creation statements.
openGauss=# AST CREATE TABLE TEST(ID INT6);

-- Statement verification is not supported.
openGauss=# AST CREATE TABLE TEST;
ERRPR: syntax error at or near ";"
LINE 1:AST CREATE TABLE TEST;
                            ^ 
Feedback
编组 3备份
    openGauss 2024-05-19 00:42:09
    cancel