summaryrefslogtreecommitdiff
path: root/src/pl/tcl/pltcl.c
diff options
context:
space:
mode:
authorDean Rasheed2023-02-22 13:23:09 +0000
committerDean Rasheed2023-02-22 13:23:09 +0000
commitd0460a31de6acc8bbb86e9e3d646f1113ebb0c20 (patch)
treef009986bb0583f6a2ee2c7dd70dd4c1b03eef065 /src/pl/tcl/pltcl.c
parent0d3b49d4af7509032c847bfc956aac98d30644bf (diff)
Add missing support for the latest SPI status codes.
SPI_result_code_string() was missing support for SPI_OK_TD_REGISTER, and in v15 and later, it was missing support for SPI_OK_MERGE, as was pltcl_process_SPI_result(). The last of those would trigger an error if a MERGE was executed from PL/Tcl. The others seem fairly innocuous, but worth fixing. Back-patch to all supported branches. Before v15, this is just adding SPI_OK_TD_REGISTER to SPI_result_code_string(), which is unlikely to be seen by anyone, but seems worth doing for completeness. Reviewed by Tom Lane. Discussion: https://postgr.es/m/CAEZATCUg8V%2BK%2BGcafOPqymxk84Y_prXgfe64PDoopjLFH6Z0Aw%40mail.gmail.com https://postgr.es/m/CAEZATCUMe%2B_KedPMM9AxKqm%3DSZogSxjUcrMe%2BsakusZh3BFcQw%40mail.gmail.com
Diffstat (limited to 'src/pl/tcl/pltcl.c')
-rw-r--r--src/pl/tcl/pltcl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 185d5bed99f..499a9eaba81 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -2441,6 +2441,7 @@ pltcl_process_SPI_result(Tcl_Interp *interp,
case SPI_OK_INSERT:
case SPI_OK_DELETE:
case SPI_OK_UPDATE:
+ case SPI_OK_MERGE:
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(ntuples));
break;