public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dean Rasheed <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Allow MERGE to be executed from PL/Tcl
Date: Mon, 20 Feb 2023 19:49:56 +0000
Message-ID: <CAEZATCUMe+_KedPMM9AxKqm=SZogSxjUcrMe+sakusZh3BFcQw@mail.gmail.com> (raw)

Another one noticed in the MERGE RETURNING patch -- this allows PL/Tcl
to execute MERGE (i.e., don't fail when SPI returns SPI_OK_MERGE). I'm
not sure if anyone uses PL/Tcl anymore, but it's a trivial fix,
probably not worth a regression test case.

Regards,
Dean


Attachments:

  [application/x-patch] allow-merge-in-pltcl.patch (372B, ../CAEZATCUMe+_KedPMM9AxKqm=SZogSxjUcrMe+sakusZh3BFcQw@mail.gmail.com/2-allow-merge-in-pltcl.patch)
  download | inline diff:
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
new file mode 100644
index 185d5be..499a9ea
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -2441,6 +2441,7 @@ pltcl_process_SPI_result(Tcl_Interp *int
 		case SPI_OK_INSERT:
 		case SPI_OK_DELETE:
 		case SPI_OK_UPDATE:
+		case SPI_OK_MERGE:
 			Tcl_SetObjResult(interp, Tcl_NewWideIntObj(ntuples));
 			break;
 


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Allow MERGE to be executed from PL/Tcl
  In-Reply-To: <CAEZATCUMe+_KedPMM9AxKqm=SZogSxjUcrMe+sakusZh3BFcQw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox