On Tue, Jun 26, 2018 at 6:18 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Tue, Jun 26, 2018 at 4:33 PM, Ashutosh Bapat > <ashutosh.ba...@enterprisedb.com> wrote: >> Looks like we need similar adjustment in ExecSimpleRelationUpdate() as >> well. Updated the patch. >> > > - /* Store the slot into tuple that we can write. */ > + /* Materialize slot into a tuple that we can inspect. */ > tuple = ExecMaterializeSlot(slot); > > I think it is better to keep the last word of the sentence as "write" > instead of "inspect" as was in the original sentence.
A copy-pasto while correcting a typo :) > It makes more > sense as we are materializing the tuple to write it. Similarly, in > the other change in the patch can use "write". Are you suggesting that we should use "write" in the modified comment instead of "inspect" in original comment. Ok, I have now corrected grammar as well. Here's updated patch. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
From fd22bc6d7d786680eb490a99da136a5dc8ba2c1b Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> Date: Tue, 26 Jun 2018 15:02:07 +0530 Subject: [PATCH 2/2] Fix a thinko/typo in ExecSimpleRelationInsert/Update A slot can not be stored in a tuple but it's vice versa. --- src/backend/executor/execReplication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index 4fbdfc0..74b3199 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -415,7 +415,7 @@ ExecSimpleRelationInsert(EState *estate, TupleTableSlot *slot) if (rel->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate, true); - /* Store the slot into tuple that we can inspect. */ + /* Materialize slot into a tuple that we can scribble upon. */ tuple = ExecMaterializeSlot(slot); /* OK, store the tuple and create index entries for it */ @@ -480,7 +480,7 @@ ExecSimpleRelationUpdate(EState *estate, EPQState *epqstate, if (rel->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate, true); - /* Store the slot into tuple that we can write. */ + /* Materialize slot into a tuple that we can scribble upon. */ tuple = ExecMaterializeSlot(slot); /* OK, update the tuple and index entries for it */ -- 2.7.4