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

GAUSS-01291 -- GAUSS-01300

GAUSS-01291: "cannot use aggregate in index predicate"

SQLSTATE: 42803

Description: Gather operations cannot be used in the expression index.

Solution: Ensure that no gather operation is used in the expression index.

GAUSS-01292: "functions in index predicate must be marked IMMUTABLE"

SQLSTATE: 42P17

Description: The volatile function cannot be used in the expression index.

Solution: Ensure that no volatile function is used in the expression index.

GAUSS-01293: "cannot use subquery in index expression"

SQLSTATE: 0A000

Description: The subquery cannot be used in the expression index.

Solution: Ensure that no subquery is used in the expression index.

GAUSS-01294: "cannot use aggregate function in index expression"

SQLSTATE: 42803

Description: Gather operations cannot be used in the expression index.

Solution: Ensure that no gather operation is used in the expression index.

GAUSS-01295: "functions in index expression must be marked IMMUTABLE"

SQLSTATE: 42P17

Description: A volatile function is used in the expression index.

Solution: Ensure that no volatile function is used in the expression index.

GAUSS-01296: "could not determine which collation to use for index expression"

SQLSTATE: 42P22

Description: The sorting mode cannot be determined in the expression index.

Solution: Specify the sorting mode during the creation of an expression index.

Example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
postgres=# create table t8 (a text collate "C", b text collate case_insensitive);
NOTICE:  The 'DISTRIBUTE BY' clause is not specified. Using round-robin as the distribution mode by default.
HINT:  Please use 'DISTRIBUTE BY' clause to specify suitable data distribution column.
CREATE TABLE
postgres=# select collation for(ifnull(a,b)) from t8;
 pg_collation_for
------------------

(1 row)
postgres=# create index t8_idx on t8(ifnull(a,b));
ERROR:  could not determine which collation to use for index expression
HINT:  Use the COLLATE clause to set the collation explicitly.

GAUSS-01297: "operator %s is not commutative"

SQLSTATE: 42809

Description: Operators are not commutative.

Solution: Use commutative operators in exclusive constraints.

GAUSS-01298: "cache lookup failed for opfamily %u"

SQLSTATE: XX000

Description: Internal system error.

Solution: Contact technical support.

GAUSS-01299: "operator %s is not a member of operator family '%s'"

SQLSTATE: 42809

Description: The operator is not a member of an expected operator family.

Solution: Use an operator which is a member of an expected operator family.

GAUSS-01300: "access method '%s' does not support ASC/DESC options"

SQLSTATE: 0A000

Description: The ASC or DESC options cannot be used for index processing.

Solution: Column storage does not support the ASC or DESC option. Do not use the index column for customized sorting.