Re: wrong comments in ClassifyUtilityCommandAsReadOnly

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: wrong comments in ClassifyUtilityCommandAsReadOnly
Date: 2024-12-23 02:43:09
Message-ID: CAApHDvrWz2k2d1Jxo7ZDXjmauo2szHHsaNOYod+afoohx2iH+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 21 Dec 2024 at 17:06, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> * Note the definitions of the relevant flags in src/include/utility/tcop.h.
> */
> static int
> ClassifyUtilityCommandAsReadOnly(Node *parsetree)
>
> Is the comment wrong?
>
> it should be
> " * Note the definitions of the relevant flags in src/include/tcop/utility.h."

Yeah. There is no tcop.h.

I used the attached (not exactly very pretty) script to find a few more.

git grep -h -E "\Wsrc/[\w_/]*" -- '*.[ch]' | tr -d '"' | tr -d \'\" |
xargs -n 1 ./fileexists.sh | grep "does not"

There are plenty of places that reference files not starting with
"src/". It might be good to verify there's some subdirectory in the
source tree that match those, however, I didn't think of a creative
way to identify those ones.

David

Attachment Content-Type Size
fileexists.sh.txt text/plain 396 bytes
fix_incorrect_filename_references.patch application/octet-stream 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2024-12-23 02:58:49 Fix a wrong comment in load_file()
Previous Message Michael Paquier 2024-12-23 00:36:46 Re: Several buildfarm animals fail tests because of shared memory error