Redundant strlen(query) in get_rel_infos

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Redundant strlen(query) in get_rel_infos
Date: 2023-05-11 03:06:42
Message-ID: CAHut+PshfqoGfFz6joYVCdqt9uM-UO2RK+edD6mfFPx3OmUt1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

While reviewing another patch to the file info.c, I noticed there seem
to be some unnecessary calls to strlen(query) in get_rel_infos()
function.

i.e. The query is explicitly initialized to an empty string
immediately prior, so why the strlen?

PSA patch for this.

------
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v1-0001-Remove-redundant-strlen.patch application/octet-stream 917 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Wei Wang (Fujitsu) 2023-05-11 03:17:25 RE: [PoC] pg_upgrade: allow to upgrade publisher node
Previous Message Peter Smith 2023-05-11 02:12:10 Re: [PoC] pg_upgrade: allow to upgrade publisher node