From 6fa297b2c44e5e00adeb0fa9d8033b7fca9de135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=BE=BE=E6=A0=87?= <848833284@qq.com> Date: Thu, 18 Jul 2024 08:34:12 +0000 Subject: [PATCH] modify error message when create global partition index --- src/bin/gsqlerr/errmsg.txt | 2 +- src/common/backend/parser/parse_utilcmd.cpp | 2 +- src/gausskernel/po/zh_CN.po | 4 ++-- src/test/regress/expected/cstore_unique_index.out | 2 +- src/test/regress/expected/gpi_bitmapscan.out | 4 ++-- src/test/regress/expected/gpi_build_index.out | 4 ++-- src/test/regress/expected/gpi_create_constraint.out | 2 +- src/test/regress/expected/hash_index_001.out | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bin/gsqlerr/errmsg.txt b/src/bin/gsqlerr/errmsg.txt index f9a4360ad..ce3847757 100644 --- a/src/bin/gsqlerr/errmsg.txt +++ b/src/bin/gsqlerr/errmsg.txt @@ -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" diff --git a/src/common/backend/parser/parse_utilcmd.cpp b/src/common/backend/parser/parse_utilcmd.cpp index e30d305e1..6f0f821eb 100644 --- a/src/common/backend/parser/parse_utilcmd.cpp +++ b/src/common/backend/parser/parse_utilcmd.cpp @@ -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), diff --git a/src/gausskernel/po/zh_CN.po b/src/gausskernel/po/zh_CN.po index 2f061646a..40bbdfd58 100644 --- a/src/gausskernel/po/zh_CN.po +++ b/src/gausskernel/po/zh_CN.po @@ -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 diff --git a/src/test/regress/expected/cstore_unique_index.out b/src/test/regress/expected/cstore_unique_index.out index fdaa96f4a..d75f8951e 100644 --- a/src/test/regress/expected/cstore_unique_index.out +++ b/src/test/regress/expected/cstore_unique_index.out @@ -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" diff --git a/src/test/regress/expected/gpi_bitmapscan.out b/src/test/regress/expected/gpi_bitmapscan.out index 0dee3501a..72393a051 100644 --- a/src/test/regress/expected/gpi_bitmapscan.out +++ b/src/test/regress/expected/gpi_bitmapscan.out @@ -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 -------------------------------------------------------------------- diff --git a/src/test/regress/expected/gpi_build_index.out b/src/test/regress/expected/gpi_build_index.out index 1f4d7662c..ce46cc65c 100644 --- a/src/test/regress/expected/gpi_build_index.out +++ b/src/test/regress/expected/gpi_build_index.out @@ -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 diff --git a/src/test/regress/expected/gpi_create_constraint.out b/src/test/regress/expected/gpi_create_constraint.out index 36d0bb68c..f3029c25e 100644 --- a/src/test/regress/expected/gpi_create_constraint.out +++ b/src/test/regress/expected/gpi_create_constraint.out @@ -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 diff --git a/src/test/regress/expected/hash_index_001.out b/src/test/regress/expected/hash_index_001.out index b0f7c85b5..b7d59c9ce 100644 --- a/src/test/regress/expected/hash_index_001.out +++ b/src/test/regress/expected/hash_index_001.out @@ -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,