This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new e4d3532dc79 Fix errors for index_including
e4d3532dc79 is described below
commit e4d3532dc7931755b0799994da1a259b5506ac5d
Author: Jinbao Chen <[email protected]>
AuthorDate: Sat Nov 8 19:41:28 2025 +0800
Fix errors for index_including
---
src/backend/utils/misc/guc_funcs.c | 2 +-
src/backend/utils/mmgr/generation.c | 4 ++--
src/test/regress/expected/index_including.out | 12 +++++++-----
src/test/regress/serial_schedule | 4 ++--
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/backend/utils/misc/guc_funcs.c
b/src/backend/utils/misc/guc_funcs.c
index 6464665112a..3d36fdefd64 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -1184,7 +1184,7 @@ DispatchSetPGVariable(const char *name, List *args, bool
is_local)
break;
case T_Float:
/* represented as a string, so
just copy it */
- appendStringInfoString(&buffer,
strVal(&con->val));
+ appendStringInfo(&buffer, "%f",
floatVal(&con->val));
break;
case T_String:
val = strVal(&con->val);
diff --git a/src/backend/utils/mmgr/generation.c
b/src/backend/utils/mmgr/generation.c
index 4d1af5cb089..1051fded48b 100644
--- a/src/backend/utils/mmgr/generation.c
+++ b/src/backend/utils/mmgr/generation.c
@@ -459,7 +459,7 @@ GenerationAlloc(MemoryContext context, Size size)
if (blksize < required_size)
blksize = pg_nextpower2_size_t(required_size);
- block = (GenerationBlock *) malloc(blksize);
+ block = (GenerationBlock *) gp_malloc(blksize);
if (block == NULL)
return NULL;
@@ -603,7 +603,7 @@ GenerationBlockFree(GenerationContext *set, GenerationBlock
*block)
wipe_mem(block, block->blksize);
#endif
- free(block);
+ gp_free(block);
}
/*
diff --git a/src/test/regress/expected/index_including.out
b/src/test/regress/expected/index_including.out
index 65863a2fc94..12f9d863d01 100644
--- a/src/test/regress/expected/index_including.out
+++ b/src/test/regress/expected/index_including.out
@@ -420,11 +420,13 @@ VACUUM nametbl;
SET enable_seqscan = 0;
-- Ensure we get an index only scan plan
EXPLAIN (COSTS OFF) SELECT c2, c1, c3 FROM nametbl WHERE c2 = 'two' AND c1 = 1;
- QUERY PLAN
-----------------------------------------------------
- Index Only Scan using nametbl_c1_c2_idx on nametbl
- Index Cond: ((c2 = 'two'::name) AND (c1 = 1))
-(2 rows)
+ QUERY PLAN
+----------------------------------------------------------
+ Gather Motion 1:1 (slice1; segments: 1)
+ -> Index Only Scan using nametbl_c1_c2_idx on nametbl
+ Index Cond: ((c2 = 'two'::name) AND (c1 = 1))
+ Optimizer: Postgres query optimizer
+(4 rows)
-- Validate the results look sane
SELECT c2, c1, c3 FROM nametbl WHERE c2 = 'two' AND c1 = 1;
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index e6bd7cf898c..34ccc0b9828 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -68,8 +68,8 @@ test: create_procedure
test: create_index
test: create_index_spgist
test: create_view
-# test: index_including
-# test: index_including_gist
+test: index_including
+test: index_including_gist
# test: create_aggregate
# test: create_function_3
# test: create_cast
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]