Thread: Typo in comment of auto_explain.c

Typo in comment of auto_explain.c

From
Ilia Evdokimov
Date:
Hi everyone,

I found typo in comment auto_explain.c line 282 (/* Enable per-node 
instrumentation iff log_analyze is required. */).

Not 'iff' but 'if'.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.




Re: Typo in comment of auto_explain.c

From
Daniel Gustafsson
Date:
> On 27 Nov 2024, at 13:46, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com> wrote:

> I found typo in comment auto_explain.c line 282 (/* Enable per-node instrumentation iff log_analyze is required. */).
>
> Not 'iff' but 'if'.

iff is a shorthand for "if and only if", which is used throughout the code.
Given the number of reports of typos we've had over the years it's discouraged
from use in new code.

--
Daniel Gustafsson




Re: Typo in comment of auto_explain.c

From
Heikki Linnakangas
Date:
On 27/11/2024 14:46, Ilia Evdokimov wrote:
> Hi everyone,
> 
> I found typo in comment auto_explain.c line 282 (/* Enable per-node 
> instrumentation iff log_analyze is required. */).
> 
> Not 'iff' but 'if'.

It's short for "if and only if". See 
https://en.wikipedia.org/wiki/If_and_only_if.

There was some previous discussion on pgsql-hackers on whether that 
usage common enough, although I don't find the thread right now. You're 
not the first one to think it's a typo :-).

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




Re: Typo in comment of auto_explain.c

From
Ilia Evdokimov
Date:
On 27.11.2024 15:54, Heikki Linnakangas wrote:
> On 27/11/2024 14:46, Ilia Evdokimov wrote:
>> Hi everyone,
>>
>> I found typo in comment auto_explain.c line 282 (/* Enable per-node 
>> instrumentation iff log_analyze is required. */).
>>
>> Not 'iff' but 'if'.
>
> It's short for "if and only if". See 
> https://en.wikipedia.org/wiki/If_and_only_if.
>
> There was some previous discussion on pgsql-hackers on whether that 
> usage common enough, although I don't find the thread right now. 
> You're not the first one to think it's a typo :-).
>
Ah, now everything is clear. I need to look at history of pgsql-hackers 
more often. Then there are no questions.

Thanks.