Re: Replace literal 0 values with the appropriate Invalid* constants - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Replace literal 0 values with the appropriate Invalid* constants
Date
Msg-id aY501dOolZoqEW_H@alap3.anarazel.de
Whole thread Raw
In response to Replace literal 0 values with the appropriate Invalid* constants  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Replace literal 0 values with the appropriate Invalid* constants
List pgsql-hackers
Hi,

On 2026-02-12 10:15:06 +0000, Bertrand Drouvot wrote:
> There are some places where we are using literal 0 instead of the proper Invalid*
> constant.
> 
> I think it's better to use the proper constant instead: It improves code clarity
> by making it explicit that these are invalid values rather than ambiguous zero
> literals.

I think we should reject these and other similar patches, they generate way
more noise than they are improving the code. If you edit the code for other
reasons and update the initialization in the course of that, ok, but these
wholesale searches for initializing with 0 use up bandwidth that we could use
for much more worthwhile things.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Next
From: David Steele
Date:
Subject: Re: recovery.signal not cleaned up when both signal files are present