modify error message when create global partition index

This commit is contained in:
徐达标
2024-07-18 08:34:12 +00:00
parent 318977c1e2
commit 6fa297b2c4
8 changed files with 11 additions and 11 deletions

View File

@ -25349,7 +25349,7 @@ CAUSE: "invalid"
ACTION: "invalid"
GAUSS-05160: "Global partition index only support btree."
GAUSS-05160: "Global partition index only support btree and ubtree."
SQLSTATE: 0A000
CAUSE: "invalid"
ACTION: "invalid"

View File

@ -4296,7 +4296,7 @@ IndexStmt* transformIndexStmt(Oid relid, IndexStmt* stmt, const char* queryStrin
if (pg_strcasecmp(stmt->accessMethod, DEFAULT_INDEX_TYPE) != 0 &&
pg_strcasecmp(stmt->accessMethod, DEFAULT_USTORE_INDEX_TYPE) != 0) {
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("Global partition index only support btree.")));
errmsg("Global partition index only support btree and ubtree.")));
}
if (isColStore) {
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),

View File

@ -14751,8 +14751,8 @@ msgstr "跨桶索引不支持列存储"
#: ../common/backend/parser/parse_utilcmd.cpp:4287
#, c-format
msgid "Global partition index only support btree."
msgstr "全局分区索引只支持btree."
msgid "Global partition index only support btree and ubtree."
msgstr "全局分区索引只支持btree和ubtree."
#: ../common/backend/parser/parse_utilcmd.cpp:4297
#, c-format

View File

@ -94,7 +94,7 @@ create unique index on part_t1 (b, c);
ERROR: Global partition index does not support column store.
-- Fail. Unique index on cstore_table can only be local index.
create unique index on part_t1 using cbtree (a, c);
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
create unique index on part_t1 using cbtree (a, c) local;
\d part_t1
Table "public.part_t1"

View File

@ -243,10 +243,10 @@ UPDATE test_part_bitmapand_ginst_btree SET sample = to_tsquery('english', txtsam
CREATE UNIQUE INDEX ON test_part_bitmapand_ginst_btree (a) local;
-- failed
CREATE INDEX qq ON test_part_bitmapand_ginst_btree USING gist (keyword tsquery_ops);
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
CREATE INDEX qq ON test_part_bitmapand_ginst_btree USING gist (keyword tsquery_ops) local;
CREATE INDEX ON test_part_bitmapand_ginst_btree USING gist (keyword tsquery_ops);
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
explain (costs off) SELECT keyword FROM test_part_bitmapand_ginst_btree WHERE keyword @> 'new' and a = 10;
QUERY PLAN
--------------------------------------------------------------------

View File

@ -39,10 +39,10 @@ create index rp_index_global15 on hw_global_index_rp ((c1-c2),c1,c2) global;
ERROR: Global partition index does not support EXPRESSION index
--succeed
create index rp_index_global16 on hw_global_index_rp using hash (c1) global;
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
--fail ERROR: access method "HASH" does not support global indexes
create index rp_index_global17 on hw_global_index_rp using gin ((c1-c2),c1,c2) global;
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
--fail ERROR: data type INTEGER has no default operator class for access method "GIN" ???
create unique index CONCURRENTLY rp_index_global18 on hw_global_index_rp (c1) global;
ERROR: cannot create concurrent partitioned indexes

View File

@ -41,7 +41,7 @@ CREATE INDEX idx8_gpi_table1 ON gpi_table1 ((c1+10), c2) GLOBAL;
ERROR: Global partition index does not support EXPRESSION index
--error
CREATE INDEX idx9_gpi_table1 ON gpi_table1 USING hash (c1, c2) GLOBAL;
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
--error
CREATE INDEX idx10_gpi_table1 ON gpi_table1 (c1);
--ok

View File

@ -161,7 +161,7 @@ NOTICE: index "hash_t4_id2" does not exist, skipping
drop index if exists hash_t4_id2_new;
NOTICE: index "hash_t4_id2_new" does not exist, skipping
create index hash_t4_id1 on hash_table_4 using hash(id) global;
ERROR: Global partition index only support btree.
ERROR: Global partition index only support btree and ubtree.
create index hash_t4_id2 on hash_table_4 using hash(id) local
(
partition index_t4_p1,