Re: MERGE ... RETURNING - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: MERGE ... RETURNING
Date
Msg-id 71d8de80-91cb-aaf6-ee65-57ea8e3a1776@postgresfriends.org
Whole thread Raw
In response to Re: MERGE ... RETURNING  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: MERGE ... RETURNING
List pgsql-hackers
On 7/12/23 02:43, Jeff Davis wrote:
> 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?

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




pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER
Next
From: Andres Freund
Date:
Subject: Re: DROP DATABASE is interruptible