Re: MERGE ... WHEN NOT MATCHED BY SOURCE - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: MERGE ... WHEN NOT MATCHED BY SOURCE
Date
Msg-id ad187001-86dc-f257-a3fb-357703dad447@postgresfriends.org
Whole thread Raw
In response to Re: MERGE ... WHEN NOT MATCHED BY SOURCE  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: MERGE ... WHEN NOT MATCHED BY SOURCE
List pgsql-hackers
On 1/4/23 12:57, Alvaro Herrera wrote:
> I haven't read this patch other than superficially; I suppose the
> feature it's introducing is an OK one to have as an extension to the
> standard.  (I hope the community members that are committee members
> will propose this extension to become part of the standard.)


I have been doing some research on this, reading the original papers 
that introduced the feature and its improvements.

I don't see anything that ever considered what this patch proposes, even 
though SQL Server has it. (The initial MERGE didn't even have DELETE!)

SOURCE and TARGET are not currently keywords, but the only things that 
can come after MATCHED are THEN and AND, so I don't foresee any issues 
with us implementing this before the committee accepts such a change 
proposal.  I also don't see how the committee could possibly change the 
semantics of this, and two implementations having it is a good argument 
for getting it in.

We should be cautious in doing something differently from SQL Server 
here, and I would appreciate any differences being brought to my 
attention so I can incorporate them into a specification, even if that 
means resorting to the hated "implementation-defined".
-- 
Vik Fearing




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: verbose mode for pg_input_error_message?
Next
From: Justin Pryzby
Date:
Subject: Re: zstd compression for pg_dump