Updated on 2023-12-22 GMT+08:00

GAUSS-00291 -- GAUSS-00300

GAUSS-00291: "unexpected non-SELECT command in DECLARE CURSOR"

SQLSTATE: XX000

Description: The syntax is not supported.

Solution: Modify the SQL statement.

GAUSS-00292: "DECLARE CURSOR must not contain data-modifying statements in WITH"

SQLSTATE: 0A000

Description: The WITH clause in the DECLARE CURSOR syntax contains the INSERT/UPDATE/DELETE statement.

Solution: Check and modify the query statement.

GAUSS-00293: "DECLARE CURSOR WITH HOLD ... FOR UPDATE/SHARE is not supported"

SQLSTATE: 0A000

Description: This feature cannot be used. The DECLARE CURSOR WITH HOLD ... FOR SelectStmt clause contains the UPDATE/SHARE statement, which is not supported.

Solution: Check and modify the query statement.

GAUSS-00294: "DECLARE SCROLL CURSOR ... FOR UPDATE/SHARE is not supported"

SQLSTATE: 0A000

Description: This feature is not supported. The DECLARE SCROLL CURSOR ... FOR SelectStmt clause contains the UPDATE/SHARE statement, which is not supported.

Solution: Check and modify the query statement.

GAUSS-00295: "DECLARE INSENSITIVE CURSOR ... FOR UPDATE/SHARE is not supported"

SQLSTATE: 0A000

Description: This feature cannot be used. The DECLARE INSENSITIVE CURSOR ... FOR SelectStmt clause contains the UPDATE/SHARE statement, which is not supported.

Solution: Check and modify the query statement.

GAUSS-00296: "EXECUTE DIRECT cannot be executed on a Datanode"

SQLSTATE: 0A000

Description: On the current DN, the EXECUTE DIRECT command cannot be run properly.

Solution: Ensure that the DN is started normally.

GAUSS-00297: "Support for EXECUTE DIRECT on multiple nodes is not available yet"

SQLSTATE: 0A000

Description: Currently, the EXECUTE DIRECT command cannot be run on multiple DNs at the same time

Solution: Modify the EXECUTE DIRECT ON ( nodename [, ... ] ) query syntax to ensure that a query statement can be run only on one node name.

GAUSS-00298: "PGXC Node %s: object not defined"

SQLSTATE: 42704

Description: The specified node object is abnormal or does not exist.

Solution: Ensure that the specified node name exists and is operating properly. If the specified node object is abnormal, restart the node.

GAUSS-00299: "EXECUTE DIRECT cannot execute multiple queries"

SQLSTATE: 0A000

Description: EXECUTE DIRECT cannot be used to execute multiple queries.

Solution: Modify EXECUTE DIRECT to ensure that it can be used to execute one query at a time.

GAUSS-00300: "EXECUTE DIRECT cannot execute DML queries"

SQLSTATE: 0A000

Description: In the EXECUTE DIRECT ON ( nodename [, ... ] ) query syntax, a DML statement is run on a DN.

Solution: Do not run the DML statement because only the SELECT statement is supported.