diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-02-22 13:28:30 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-02-22 13:28:30 +0000 |
commit | 52dbd9f845987ff3a6f97d30b3bebb13fdb4b2b4 (patch) | |
tree | 68f7175dc9bffd3e631c37a7779e459eafecbb96 /src/backend/executor/spi.c | |
parent | 463bef38332efaef39de22e4325688924a934b76 (diff) | |
download | postgresql-52dbd9f845987ff3a6f97d30b3bebb13fdb4b2b4.tar.gz postgresql-52dbd9f845987ff3a6f97d30b3bebb13fdb4b2b4.zip |
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/backend/executor/spi.c')
-rw-r--r-- | src/backend/executor/spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 5f9e0e31113..d8a754050f0 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -1866,6 +1866,8 @@ SPI_result_code_string(int code) return "SPI_OK_REL_REGISTER"; case SPI_OK_REL_UNREGISTER: return "SPI_OK_REL_UNREGISTER"; + case SPI_OK_TD_REGISTER: + return "SPI_OK_TD_REGISTER"; } /* Unrecognized code ... return something useful ... */ sprintf(buf, "Unrecognized SPI code %d", code); |