更新时间:2023-12-11 GMT+08:00
分享

GAUSS-01281 -- GAUSS-01290

GAUSS-01281: "access method '%s' does not support unique indexes"

SQLSTATE: 0A000

错误原因:该索引方式不支持唯一索引。

解决办法:请勿使用报错提示的索引类建立唯一索引。

GAUSS-01282: "access method '%s' does not support multicolumn indexes"

SQLSTATE: 0A000

错误原因:该索引方式不支持组合索引。

解决办法:请勿使用报错提示的索引类建立唯一索引。

GAUSS-01283: "access method '%s' does not support exclusion constraints"

SQLSTATE: 0A000

错误原因:该索引方式不支持排他约束。

解决办法:请勿使用报错提示的索引类附加排他约束。

GAUSS-01284: "PrimaryKey/UniqueIndex of distribute table must contain hash distribution column"

SQLSTATE: 0A000

错误原因:GaussDB(DWS)主键约束通过unique btree索引实现。主键约束没有包含分布列时,无法成功创建索引。

解决办法:请检查主键约束中是否包含分布列。

GAUSS-01285: "unknown constraint type"

SQLSTATE: XX000

错误原因:创建索引时定义的约束类型错误。

解决办法:创建索引的约束类型关键字只能为PRIMARY KEY、UNIQUE、EXCLUDE,请使用有效的约束关键字重新创建索引。

GAUSS-01286: "fail to get index info when create index partition"

SQLSTATE: 42P17

错误原因:创建分区索引时,获取索引信息失败。

解决办法:请重新创建分区索引,如仍然提示失败,请联系技术支持工程师提供技术支持。

GAUSS-01287: "index partition with name '%s' already exists"

SQLSTATE: 42704

错误原因:分区索引名已存在。

解决办法:修改分区索引名请勿重复。

GAUSS-01289: "collation '%s' does not exist"

SQLSTATE: 42P17

错误原因:索引的排序模式不存在。

解决办法:检查索引的排序模式是否正确。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
postgres=# create table t7(c1 int,c2 text)
postgres-# partition by range (c2)(
postgres(# partition p0 values less than ('a'),
postgres(# partition p1 values less than ('b'),
postgres(# partition p2 values less than (maxvalue));
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=# create unique index t7_idx on t7 (c2 COLLATE "xxxx") local(
postgres(# partition p0,partition p1,partition p2);
ERROR:  collation "xxxx" does not exist

GAUSS-01290: "cannot use subquery in index predicate"

SQLSTATE: 0A000

错误原因:表达式索引中不能使用子查询。

解决办法:请勿在表达式索引中使用子查询。

分享:

    相关文档

    相关产品