Updated on 2023-12-22 GMT+08:00

GAUSS-01271 -- GAUSS-01280

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

SQLSTATE: 0A000

Description: Local partitioned indexes cannot be created for non-partitioned tables.

Solution: If you need to create a partitioned index in local mode, rebuild the base table as a partitioned table.

If you do not need to create a partitioned index in local mode, delete the local parameter from Create unique index...local.

GAUSS-01272: "cannot create concurrent partitioned indexes "

SQLSTATE: 0A000

Description: Internal system error.

Solution: Contact technical support.

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

SQLSTATE: 0A000

Description: Global indexes cannot be created for partitioned tables.

Solution: Do not create a global index on a partitioned table.

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

SQLSTATE: 42809

Description: The index cannot be created on the foreign table.

Solution: Do not create an index on the foreign table.

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

SQLSTATE: 0A000

Description: The index cannot be created on temporary tables of other sessions.

Solution: Do not create an index on temporary tables of other sessions.

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

SQLSTATE: XX000

Description: The partitioned table fails to be obtained during the creation of an index.

Solution: Check whether the partition definition of the partitioned table is correct. If it is not, rebuild the partitioned table.

GAUSS-01277: "Not enough index partition defined"

SQLSTATE: 42P17

Description: The number of existing indexes on the partitioned table is insufficient.

Solution: Rebuild the partitioned table to ensure that the number of partitions is equal to the number of partitioned indexes.

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

SQLSTATE: 42P17

Description: The number of partitions in the partitioned table is smaller than the number of partitioned indexes.

Solution: Rebuild the partitioned table to ensure that the number of partitions is equal to the number of partitioned indexes.

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

SQLSTATE: 42P17

Description: The unique index columns must contain a partition key.

Solution: Ensure that the unique index columns contain a partition key.

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

SQLSTATE: 42P17

Description: The unique index columns must contain a partition key.

Solution: Ensure that the unique index columns contain a partition key and the default sorting mode is used.

Example:

 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