Thread: Re: Remove an obsolete comment in gistinsert()

Re: Remove an obsolete comment in gistinsert()

From
Aleksander Alekseev
Date:
Hi Tender,

> While learning the GIST codes, I find an obsolete comment in gistinsert ().
>
> itup = gistFormTuple(giststate, r,
>                                   values, isnull, true /* size is currently bogus */ );

Thanks for reporting. I agree that this is an oversight of commit 1f7ef54.

The commit changed the signature of gistFormTuple():

```
 IndexTuple
 gistFormTuple(GISTSTATE *giststate, Relation r,
-                         Datum attdata[], int datumsize[], bool isnull[])
+                         Datum attdata[], bool isnull[], bool newValues)
```

... but left the comment for the `datumsize` argument:

```
        itup = gistFormTuple(&buildstate->giststate, index,
-               values, NULL /* size is currently bogus */, isnull);
+               values, isnull, true /* size is currently bogus */);
```

I checked the rest of gistFormTuple() calls and also looked for other
comments like this. There seems to be only one call like this to fix.

-- 
Best regards,
Aleksander Alekseev



Re: Remove an obsolete comment in gistinsert()

From
Tender Wang
Date:


Aleksander Alekseev <aleksander@timescale.com> 于2024年11月5日周二 22:08写道:
Hi Tender,

> While learning the GIST codes, I find an obsolete comment in gistinsert ().
>
> itup = gistFormTuple(giststate, r,
>                                   values, isnull, true /* size is currently bogus */ );

Thanks for reporting. I agree that this is an oversight of commit 1f7ef54.

The commit changed the signature of gistFormTuple():

```
 IndexTuple
 gistFormTuple(GISTSTATE *giststate, Relation r,
-                         Datum attdata[], int datumsize[], bool isnull[])
+                         Datum attdata[], bool isnull[], bool newValues)
```

... but left the comment for the `datumsize` argument:

```
        itup = gistFormTuple(&buildstate->giststate, index,
-               values, NULL /* size is currently bogus */, isnull);
+               values, isnull, true /* size is currently bogus */);
```

I checked the rest of gistFormTuple() calls and also looked for other
comments like this. There seems to be only one call like this to fix.

Thanks for reviewing this. I have added it to the 2015-01 commitfest. 

--
Thanks,
Tender Wang

Re: Remove an obsolete comment in gistinsert()

From
Tender Wang
Date:


Michael Paquier <michael@paquier.xyz> 于2024年11月7日周四 14:11写道:
On Thu, Nov 07, 2024 at 10:57:08AM +0800, Tender Wang wrote:
> Thanks for reviewing this. I have added it to the 2015-01 commitfest.

Right.  I don't quite see why this comment would apply anymore, and
the commit you are pointing to looks right.  Will fix.

Thanks for pushing. I have changed the status to committed on commitfest 2025-01 


--
Thanks,
Tender Wang