Re: MERGE ... WHEN NOT MATCHED BY SOURCE

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: MERGE ... WHEN NOT MATCHED BY SOURCE
Date: 2023-02-26 01:13:57
Message-ID: ad187001-86dc-f257-a3fb-357703dad447@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2023-02-26 01:22:27 Re: zstd compression for pg_dump
Previous Message Tom Lane 2023-02-26 01:07:33 Re: verbose mode for pg_input_error_message?