Skip to content

Commit 2c0c2bb

Browse files
committed
Use text type in add_node() to calm down opr_sanity regression test
1 parent 035f868 commit 2c0c2bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/mmts/multimaster--1.0.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CREATE FUNCTION mtm.drop_node(node integer, drop_slot bool default false) RETURN
1313
AS 'MODULE_PATHNAME','mtm_drop_node'
1414
LANGUAGE C;
1515

16-
CREATE FUNCTION mtm.add_node(conn_str cstring) RETURNS void
16+
CREATE FUNCTION mtm.add_node(conn_str text) RETURNS void
1717
AS 'MODULE_PATHNAME','mtm_add_node'
1818
LANGUAGE C;
1919

contrib/mmts/multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3015,7 +3015,7 @@ mtm_drop_node(PG_FUNCTION_ARGS)
30153015
Datum
30163016
mtm_add_node(PG_FUNCTION_ARGS)
30173017
{
3018-
char* connStr = PG_GETARG_CSTRING(0);
3018+
char *connStr = text_to_cstring(PG_GETARG_TEXT_PP(0));
30193019

30203020
if (Mtm->nAllNodes == MtmMaxNodes) {
30213021
elog(ERROR, "Maximal number of nodes %d is reached", MtmMaxNodes);

0 commit comments

Comments
 (0)