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

GAUSS-00301 -- GAUSS-00310

GAUSS-00301: "EXECUTE DIRECT cannot execute this utility query"

SQLSTATE: 0A000

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

Solution: In the EXECUTE DIRECT ON ( nodename [, ... ] ) query syntax, ensure that the DDL statement cannot be executed and only the SELECT statement is supported.

GAUSS-00302: "EXECUTE DIRECT cannot execute locally this utility query"

SQLSTATE: 0A000

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

Solution: In the EXECUTE DIRECT ON ( nodename [, ... ] ) query syntax, ensure that the variable setting statement cannot be executed and only the SELECT statement is supported.

GAUSS-00303: "SELECT FOR UPDATE/SHARE is not allowed with DISTINCT clause"

SQLSTATE: 0A000

Description: The DISTINCT clause cannot be used for SELECT FOR UPDATE/SHARE.

Solution: Modify the SQL statement.

GAUSS-00304: "SELECT FOR UPDATE/SHARE is not allowed with GROUP BY clause"

SQLSTATE: 0A000

Description: The GROUP BY clause cannot be used for the SELECT ... FOR UPDATE/SHARE syntax.

Solution: Modify the SELECT ... FOR UPDATE/SHARE statement.

GAUSS-00305: "SELECT FOR UPDATE/SHARE is not allowed with HAVING clause"

SQLSTATE: 0A000

Description: The SELECT FOR UPDATE/SHARE syntax does not support the HAVING clause.

Solution: Modify the SELECT ... FOR UPDATE/SHARE statement.

GAUSS-00306: "SELECT FOR UPDATE/SHARE is not allowed with aggregate functions"

SQLSTATE: 0A000

Description: Aggregate functions cannot be used with SELECT ... FOR UPDATE/SHARE.

Solution: Modify the SELECT ... FOR UPDATE/SHARE statement.

GAUSS-00307: "SELECT FOR UPDATE/SHARE is not allowed with window functions"

SQLSTATE: 0A000

Description: Window functions cannot be used with SELECT ... FOR UPDATE/SHARE.

Solution: Modify the SELECT ... FOR UPDATE/SHARE statement.

GAUSS-00308: "SELECT FOR UPDATE/SHARE is not allowed with set-returning functions in the target list"

SQLSTATE: 0A000

Description: In the target list of the SELECT ... FOR UPDATE/SHARE syntax, the function with the return value defined is not supported.

Solution: Modify the SELECT ... FOR UPDATE/SHARE statement.

GAUSS-00309: "SELECT FOR UPDATE/SHARE must specify unqualified relation names"

SQLSTATE: 42601

Description: In the SELECT ... FOR UPDATE/SHARE...OF table_name syntax, the specified table name contains a database or schema reference.

Solution: Ensure that the specified table name in the SELECT ... FOR UPDATE/SHARE...OF table_name syntax is a specific one rather than table references, such as database.table and schema.table.

GAUSS-00310: "SELECT FOR UPDATE/SHARE cannot be used with column table '%s'"

SQLSTATE: 0A000

Description: The table specified in the SELECT ... FOR UPDATE/SHARE...OF table_name syntax is a column storage table.

Solution: Ensure that the table specified in the SELECT ... FOR UPDATE/SHARE...OF table_name syntax cannot be a column storage table. Modify the syntax structure.