From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: MERGE lacks ruleutils.c decompiling support!?
Date: Fri, 05 May 2023 09:36:41 -0400
Message-ID: <3579737.1683293801@sss.pgh.pa.us> (raw)
I made this function:
CREATE OR REPLACE FUNCTION test_fun()
RETURNS void
LANGUAGE SQL
BEGIN ATOMIC
MERGE INTO target
USING source s on s.id = target.id
WHEN MATCHED THEN
UPDATE SET data = s.data
WHEN NOT MATCHED THEN
INSERT VALUES (s.id, s.data);
end;
It appears to work fine, but:
regression=# \sf+ test_fun()
ERROR: unrecognized query command type: 5
and it also breaks pg_dump. Somebody screwed up pretty badly
here. Is there any hope of fixing it for Monday's releases?
(I'd guess that decompiling the WHEN clause would take a nontrivial
amount of new code, so maybe fixing it on such short notice is
impractical. But ugh.)
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: MERGE lacks ruleutils.c decompiling support!?
In-Reply-To: <3579737.1683293801@sss.pgh.pa.us>
References: <3579737.1683293801@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox