Remove an obsolete comment in gistinsert()
Tender Wang <tndrwang@gmail.com>
From: Tender Wang <tndrwang@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-11-05T11:48:37Z
Lists: pgsql-hackers
Attachments
- 0001-Remove-an-obsolete-comment-in-gistinsert.patch (application/octet-stream) patch 0001
Hi,
While learning the GIST codes, I find an obsolete comment in gistinsert ().
itup = gistFormTuple(giststate, r,
values, isnull, true /* size is currently
bogus */ );
The comment "/* size is currently bogus */" is weird because it follows a
bool variable.
I tracked the commit history. The original gistFormTuple() prototype is as
below:
extern IndexTuple gistFormTuple(GISTSTATE *giststate,
Relation r, Datum *attdata, int *datumsize, bool
*isnull);
you can see this commit 37c8393 to check that.
After 1f7ef54, the function prototype changed, as below:
extern IndexTuple gistFormTuple(GISTSTATE *giststate,
Relation r, Datum *attdata, bool *isnull, bool
newValues);
As you can see, "int *datumsize" had been removed, but the comments in
gistbuildCallback() and gistinsert() were not removed together.
By the way, after commit 5edb24a, the comments in gistbuildCallback() was
removed.
So I think we can now remove the obsolete comment from gistinsert().
--
Thanks,
Tender Wang
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