Re: Remove an obsolete comment in gistinsert()
Aleksander Alekseev <aleksander@timescale.com>
From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Tender Wang <tndrwang@gmail.com>
Date: 2024-11-05T14:08:20Z
Lists: pgsql-hackers
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
Commits
-
Remove an obsolete comment in gistinsert()
- 987027bcc043 18.0 landed
-
Buffering GiST index build algorithm.
- 5edb24a8983e 9.2.0 cited
-
Changes
- 1f7ef548ec2e 8.2.0 cited
-
WAL for GiST. It work for online backup and so on, but on
- 37c839365c56 8.1.0 cited