Missing cases from SPI_result_code_string()

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Missing cases from SPI_result_code_string()
Date: 2023-02-20 18:52:16
Message-ID: CAEZATCUg8V+K+GcafOPqymxk84Y_prXgfe64PDoopjLFH6Z0Aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Another one noticed from the MERGE RETURNING patch -- the switch
statement in SPI_result_code_string() is missing cases for
SPI_OK_TD_REGISTER and SPI_OK_MERGE.

The SPI_OK_TD_REGISTER case goes back all the way, so I suppose it
should be back-patched to all supported branches, though evidently
this is not something anyone is likely to care about.

The SPI_OK_MERGE case is perhaps a little more visible (e.g., execute
MERGE from PL/Perl using $rv = spi_exec_query() and then examine
$rv->{status}). It's also missing from the docs for SPI_Execute().
Having tested that it now works as expected, I don't think there's
much point in adding a regression test case for it though.

Regards,
Dean

Attachment Content-Type Size
SPI_result_code_string.patch text/x-patch 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-02-20 18:53:53 Re: meson: Non-feature feature options
Previous Message Andrey Borodin 2023-02-20 18:45:53 Re: psql \watch 2nd argument: iteration count