Subject: Re: MERGE ... RETURNING

From: Jeff Davis <[email-masked]>
Date: Tue, 11 Jul 2023 17:43:14 -0700

On Sun, 2023-01-22 at 19:58 +0100, Alvaro Herrera wrote:
> 
> (We do have to keep our fingers
> crossed that they will decide to use the same RETURNING syntax as we
> do
> in this patch, of course.)

Do we have a reason to think that they will accept something similar?

Regards,
	Jeff Davis

---

From: Vik Fearing <[email-masked]>
Date: Wed, 12 Jul 2023 03:47:24 +0200

> Do we have a reason to think that they will accept something similar?

We have reason to think that they won't care at all.

There is no RETURNING clause in Standard SQL, and the way they would do 
this is:

     SELECT ...
     FROM OLD TABLE (
         MERGE ...
     ) AS m

The rules for that for MERGE are well defined.
-- 
Vik Fearing