From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Remove an obsolete comment in gistinsert() |
Date: | 2024-11-05 11:48:37 |
Message-ID: | CAHewXNkjU95_HdioDVU=5yBq_Xt=GfBv=Od-0oKtiA006pWW7Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
0001-Remove-an-obsolete-comment-in-gistinsert.patch | application/octet-stream | 872 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | hugo | 2024-11-05 11:51:34 | Re: Useless field ispartitioned in CreateStmtContext |
Previous Message | Rafia Sabih | 2024-11-05 11:32:34 | Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch) |