Re: MERGE SQL statement for PG12 - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: MERGE SQL statement for PG12
Date
Msg-id CABOikdPL3qBohM7deqC5M-F8BkVSkdnEDytSupi5JtxS-egHZw@mail.gmail.com
Whole thread Raw
In response to Re: MERGE SQL statement for PG12  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: MERGE SQL statement for PG12  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi Robert,

Thanks for the comments.

On Fri, Jan 11, 2019 at 2:45 AM Robert Haas <robertmhaas@gmail.com> wrote:

I feel like there has been some other thread where this was discussed,
but I can't find it right now.  I think that the "query construction"
logic in transformMergeStmt is fundamentally the wrong way to do this.
I think several others have said the same. 

Can you please help me understand what's fundamentally wrong with the approach and more importantly, can you please explain what would the the architecturally sound way to do this? The same also applies to the executor side where the current approach is deemed wrong, but very little is said on what's the correct way. 
 
And I don't think this
should be considered for commit until that is rewritten.
 
I understand. I'm not suggesting that the patch is in committable shape, if it wasn't last April, because nothing has changed since then. The purpose of keeping it up-to-date is to solicit feedback and directions and to show that my interest in the patch is still intact.

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: SPI Interface to Call Procedure with Transaction Control Statements?
Next
From: Andres Freund
Date:
Subject: Re: Reducing header interdependencies around heapam.h et al.