Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Etsuro Fujita
(2017/11/28 7:58), Tom Lane wrote: Pushed with that and some cosmetic fiddling with comments and docs. Thank you. Best regards, Etsuro Fujita

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
Dean Rasheed writes: > On 27 November 2017 at 16:35, Tom Lane wrote: >> On looking closer, the reason it's like that in Fujita-san's patch >> is to minimize the API churn seen by FDW AddForeignUpdateTargets >> functions, specifically whether they see a tlist that's before or >> after what expand_

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Dean Rasheed
On 27 November 2017 at 16:35, Tom Lane wrote: > I wrote: >> Dean Rasheed writes: >>> A separate point -- it might be marginally more efficient to have the >>> work of rewriteTargetListUD() done after expand_targetlist() to avoid >>> the possible renumbering of the resjunk entries. > >> Hm. It wo

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
I wrote: > Dean Rasheed writes: >> A separate point -- it might be marginally more efficient to have the >> work of rewriteTargetListUD() done after expand_targetlist() to avoid >> the possible renumbering of the resjunk entries. > Hm. It wouldn't save a lot, but yeah, doing it in this order see

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Tom Lane
Dean Rasheed writes: > I wonder if, years from now, it might look a bit odd that > rewriteTargetListUD() is doing part of work of preptlist.c, is only > called from there, and yet is located in the rewriter. Yeah, I probably wouldn't have done it like this in a green field, but maintaining tracea

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-27 Thread Dean Rasheed
On 26 November 2017 at 22:56, Tom Lane wrote: > Etsuro Fujita writes: >> [ fix-rewrite-tlist-v4.patch ] > > I started reviewing this patch. I did not much like the fact that it > effectively moved rewriteTargetListUD to a different file and renamed it. > That seems like unnecessary code churn, p

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-26 Thread Etsuro Fujita
(2017/11/27 7:56), Tom Lane wrote: Etsuro Fujita writes: [ fix-rewrite-tlist-v4.patch ] I started reviewing this patch. Great! I did not much like the fact that it effectively moved rewriteTargetListUD to a different file and renamed it. That seems like unnecessary code churn, plus it bre

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-11-26 Thread Tom Lane
Etsuro Fujita writes: > [ fix-rewrite-tlist-v4.patch ] I started reviewing this patch. I did not much like the fact that it effectively moved rewriteTargetListUD to a different file and renamed it. That seems like unnecessary code churn, plus it breaks the analogy with rewriteTargetListIU, plus