Re: Thinko/typo in ExecSimpleRelationInsert

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thinko/typo in ExecSimpleRelationInsert
Date: 2018-06-26 15:13:30
Message-ID: CAA4eK1LWD8-KS6GWsMiyAfmZhV5ftfC2mpbLJR5iV+MHPCJTXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 26, 2018 at 7:02 PM, Ashutosh Bapat
<ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> On Tue, Jun 26, 2018 at 6:18 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>> On Tue, Jun 26, 2018 at 4:33 PM, Ashutosh Bapat
>> <ashutosh(dot)bapat(at)enterprisedb(dot)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.
>

Yes.

Another variant used in few other similar places is:

/*
* get the heap tuple out of the tuple table slot, making sure we have a
* writable copy
*/

> Ok, I have now corrected grammar as well. Here's updated patch.
>

Your new comment is also correct. I like the comment already used in
code as that makes the code consistent, what do you think?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Moser 2018-06-26 15:23:18 Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Previous Message Alexander Kuzmenkov 2018-06-26 15:11:24 Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused