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

From Tom Lane
Subject Re: Fixed a typo in comment in compress_lz4.c
Date
Msg-id 829063.1760393323@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixed a typo in comment in compress_lz4.c  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Fixed a typo in comment in compress_lz4.c
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
>> 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.

I disagree that it's not widely known.  OneLook Dictionary Search [1]
defines it correctly as "Usually means: If and only if; equivalence"
and reports finding it in 35 of their underlying dictionaries,
including all the usual suspects.  (Some of the 35 know the military
term "IFF: Identification Friend or Foe" rather than what we're
after, but still that's plenty of hits.)

I wonder whether adding it to our glossary would be helpful.

            regards, tom lane

[1] https://www.onelook.com/?w=iff



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path
Next
From: Jeff Davis
Date:
Subject: Re: Clarification on Role Access Rights to Table Indexes