
# GAUSS-01291 -- GAUSS-01300 错误码
GAUSS-01291: "cannot use aggregate in index predicate"
SQLSTATE: 42803
错误原因：表达式索引中不能使用聚集操作。
解决办法：请勿在表达式索引中使用聚集操作。
GAUSS-01292: "functions in index predicate must be marked IMMUTABLE"
SQLSTATE: 42P17
错误原因：表达式索引中不能使用易变函数。
解决办法：保证表达式索引中的函数为不变函数。
GAUSS-01293: "cannot use subquery in index expression"
SQLSTATE: 0A000
错误原因：表达式索引中不能使用子查询。
解决办法：请勿在表达式索引中使用子查询。
GAUSS-01294: "cannot use aggregate function in index expression"
SQLSTATE: 42803
错误原因：表达式索引中不能使用聚集操作。
解决办法：请勿在表达式索引中使用聚集操作。
GAUSS-01295: "functions in index expression must be marked IMMUTABLE"
SQLSTATE: 42P17
错误原因：表达式索引中的函数不能变化。
解决办法：保证表达式索引中的函数为不变函数。
GAUSS-01296: "could not determine which collation to use for index expression"
SQLSTATE: 42P22
错误原因：无法决定在表达式索引中使用哪种排序方式。
解决办法：需要在创建表达式索引时指定排序方式。
示例：
```
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
错误原因：操作符不可交换。
解决办法：排他约束中必须使用可交换操作符。
GAUSS-01298: "cache lookup failed for opfamily %u"
SQLSTATE: XX000
错误原因：系统内部错误。
解决办法：请联系技术支持工程师提供技术支持。
GAUSS-01299: "operator %s is not a member of operator family '%s'"
SQLSTATE: 42809
错误原因：操作符不在期望的操作符家族之列。
解决办法：排除操作符必须和索引约束有关。
GAUSS-01300: "access method '%s' does not support ASC/DESC options"
SQLSTATE: 0A000
错误原因：索引处理方法不支持ASC/DESC选项。
解决办法：列存不支持ASC/DESC选项，不建议使用索引列自定义排序。
