Re: Fixed a typo in comment in compress_lz4.c - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fixed a typo in comment in compress_lz4.c
Date
Msg-id 41B9A29C-0FD4-4DC8-A0F5-243CB57A2819@gmail.com
Whole thread Raw
In response to Re: Fixed a typo in comment in compress_lz4.c  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers


On Oct 14, 2025, at 05:31, Daniel Gustafsson <daniel@yesql.se> wrote:

On 13 Oct 2025, at 23:25, Chao Li <li.evan.chao@gmail.com> wrote:

Fixed a typo: "iff" -> "if" that I found while reviewing the other patch.

iff is shorthand for "if and only if", so it is correct here.  That being said,
it's also the cause of many typofix suggstions so it's clearly not widely known
anymore and we try to avoid it new code/comments.  Maybe a case could be made
for changing all the iff's in the code to aid readability, but it would have to
be measured against the induced churn.

--
Daniel Gustafsson


Oh… I was misled by [1]. I should have done a Google search for that by myself.

I just did a search and found 219 occurrences:

```
chaol@ChaodeMacBook-Air postgresql % grep -Rho --include='*.c' --include='*.h' ' iff' . | wc -l
     219
```

Do you think it is worth replacing all in a batch?

[1] https://www.postgresql.org/message-id/CAKFQuwa6jgVj18bRGE3edy2Z%3D5%3DDAUGL8efxG2KdWJg12nF0kw%40mail.gmail.com

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Support getrandom() for pg_strong_random() source
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path