From eefe0aeb4d8d9186126196089d043f94396cd707 Mon Sep 17 00:00:00 2001 From: naisila Date: Thu, 25 Jul 2024 16:24:33 +0200 Subject: [PATCH] Ruleutils_17 Implement ALTER TABLE ... SPLIT PARTITION ... command Relevant PG commit: 87c21bb9412c8ba2727dec5ebcd74d44c2232d11 https://github.com/postgres/postgres/commit/87c21bb9412c8ba2727dec5ebcd74d44c2232d11 --- .../distributed/deparser/ruleutils_17.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/backend/distributed/deparser/ruleutils_17.c b/src/backend/distributed/deparser/ruleutils_17.c index 985c7c6a4..69b56ca95 100644 --- a/src/backend/distributed/deparser/ruleutils_17.c +++ b/src/backend/distributed/deparser/ruleutils_17.c @@ -9691,6 +9691,24 @@ get_range_partbound_string(List *bound_datums) return buf->data; } +/* + * get_list_partvalue_string + * A C string representation of one list partition value + */ +char * +get_list_partvalue_string(Const *val) +{ + deparse_context context; + StringInfo buf = makeStringInfo(); + + memset(&context, 0, sizeof(deparse_context)); + context.buf = buf; + + get_const_expr(val, &context, -1); + + return buf->data; +} + /* * Collect a list of OIDs of all sequences owned by the specified relation, * and column if specified. If deptype is not zero, then only find sequences