pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Replace literal 0 values with the appropriate Invalid* constants
Date: Thu, 12 Feb 2026 19:51:18 -0500
Message-ID: <aY501dOolZoqEW_H@alap3.anarazel.de> (raw)
In-Reply-To: <aY2oKlSpikgO9m+X@ip-10-97-1-34.eu-west-3.compute.internal>
References: <aY2oKlSpikgO9m+X@ip-10-97-1-34.eu-west-3.compute.internal>

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





view thread (3+ messages)  latest in thread

Message-ID: <aY501dOolZoqEW_H@alap3.anarazel.de>
Permalink:  ../aY501dOolZoqEW_H@alap3.anarazel.de/
Also on:    postgresql.org/message-id/aY501dOolZoqEW_H@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andres@anarazel.de, bertranddrouvot.pg@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Replace literal 0 values with the appropriate Invalid* constants
  In-Reply-To: <aY501dOolZoqEW_H@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox