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

GAUSS-01271 -- GAUSS-01280

GAUSS-01271: "non-partitioned table does not support local partitioned indexes "

SQLSTATE: 0A000

错误原因:非分区表不支持创建local模式下的分区索引。

解决办法:1、如果需要创建local模式下的分区索引,需要重新创建基表为分区表。

2、如果不需要创建local模式下的分区索引,需要删除Create unique index...local;语法最后的local参数。

GAUSS-01272: "cannot create concurrent partitioned indexes "

SQLSTATE: 0A000

错误原因:系统内部错误。

解决办法:请联系技术支持工程师提供技术支持。

GAUSS-01273: "partitioned table does not support global index"

SQLSTATE: 0A000

错误原因:分区表不支持全局索引。

解决办法:请勿在分区表创建全局索引。

GAUSS-01274: "cannot create index on foreign table '%s'"

SQLSTATE: 42809

错误原因:不能在外表上创建索引。

解决办法:请勿在外表上创建索引。

GAUSS-01275: "cannot create indexes on temporary tables of other sessions"

SQLSTATE: 0A000

错误原因:不能在其他会话的临时表上创建索引。

解决办法:请勿在其他会话的临时表上创建索引。

GAUSS-01276: "when creating partitioned index, get table partitions failed"

SQLSTATE: XX000

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

解决办法:请检查分区表的分区定义是否正确,如果不正确,请重建分区表。

GAUSS-01277: "Not enough index partition defined"

SQLSTATE: 42P17

错误原因:分区表上已有索引不足。

解决办法:请重建分区表中分区数,必须等于分区索引的数目。

GAUSS-01278: "number of partitions of LOCAL index must equal that of the underlying table"

SQLSTATE: 42P17

错误原因:分区表中分区数目小于分区索引的数目。

解决办法:请重建分区表中分区数,必须等于分区索引的数目。

GAUSS-01279: "unique index columns must contain the partition key"

SQLSTATE: 42P17

错误原因:唯一索引列必须包含分区键。

解决办法:唯一索引列必须包含分区键。

GAUSS-01280: "unique index columns must contain the partition key and collation must be default collation"

SQLSTATE: 42P17

错误原因:唯一索引列必须包含分区键。

解决办法:检查唯一索引列,唯一索引列必须包含分区键,排序方式必须使用默认方式。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
postgres=# create table t6 (a int,b text collate "C")
postgres-# distribute by hash (a)
postgres-# partition by range(b)(
postgres(# partition p1 values less than('a'),
postgres(# partition p2 values less than('h'),
postgres(# partition p3 values less than(maxvalue));
CREATE TABLE
postgres=# alter table t6 add constraint t6_unique_key primary key (a);
ERROR:  unique index columns must contain the partition key and collation must be default collation
postgres=# alter table t6 add constraint t6_unique_key unique (a,b);
NOTICE:  ALTER TABLE / ADD UNIQUE will create implicit index "t6_unique_key" for table "t6"
ALTER TABLE

分享:

    相关文档

    相关产品