Useless parameter 'cur_skey' in IndexScanOK

Started by Hugo Zhangalmost 2 years ago4 messageshackers
Jump to latest
#1Hugo Zhang
hugo.zhang@openpie.com

Hi,
The 'cur_skey' parameter in `IndexScanOK` funciton doesn't seem to be useful.

The function does not use cur_skey for any operation. Is there any other consideration
for retaining the cur_skey parameter here?

Best wishes
Hugo zhang

#2Aleksander Alekseev
aleksander@timescale.com
In reply to: Hugo Zhang (#1)
Re: Useless parameter 'cur_skey' in IndexScanOK

Hi,

The 'cur_skey' parameter in `IndexScanOK` funciton doesn't seem to be useful.

Good catch. As I understand it is not used for anything since
a78fcfb51243 (dated 2006) and this is a static function, so we
shouldn't worry about third-party extensions.

I wonder why none of the compilers complained about this.

Here is the patch.

--
Best regards,
Aleksander Alekseev

Attachments:

v1-0001-IndexScanOK-remove-unused-parameter-cur_skey.patchapplication/x-patch; name=v1-0001-IndexScanOK-remove-unused-parameter-cur_skey.patchDownload+3-4
#3Daniel Gustafsson
daniel@yesql.se
In reply to: Aleksander Alekseev (#2)
Re: Useless parameter 'cur_skey' in IndexScanOK

On 3 Jul 2024, at 15:41, Aleksander Alekseev <aleksander@timescale.com> wrote:

The 'cur_skey' parameter in `IndexScanOK` funciton doesn't seem to be useful.

Good catch. As I understand it is not used for anything since
a78fcfb51243 (dated 2006) and this is a static function, so we
shouldn't worry about third-party extensions.

Agreed, it seems reasonable to clean this up.

I wonder why none of the compilers complained about this.

Not to mention static analyzers.

--
Daniel Gustafsson

#4Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Daniel Gustafsson (#3)
Re: Useless parameter 'cur_skey' in IndexScanOK

On 03/07/2024 16:46, Daniel Gustafsson wrote:

On 3 Jul 2024, at 15:41, Aleksander Alekseev <aleksander@timescale.com> wrote:

The 'cur_skey' parameter in `IndexScanOK` funciton doesn't seem to be useful.

Good catch. As I understand it is not used for anything since
a78fcfb51243 (dated 2006) and this is a static function, so we
shouldn't worry about third-party extensions.

Agreed, it seems reasonable to clean this up.

I wonder why none of the compilers complained about this.

Not to mention static analyzers.

Committed, thanks.

--
Heikki Linnakangas
Neon (https://neon.tech)