| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Replace literal 0 values with the appropriate Invalid* constants |
| Date: | 2026-02-13 06:42:42 |
| Message-ID: | aY7H4lYax7vvBy8F@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Thu, Feb 12, 2026 at 07:51:18PM -0500, Andres Freund wrote:
> 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.
Thanks for sharing your thoughts! I'll keep using Coccinelle but only for things
that provide more "added" value to the code.
Though I thought that for things like the ones in this thread (that I agree don't
provide a lot of added value), proceding like:
> > (and that could be merged at an interval of choice if we feel that's too much noise).
could have been a valuable option.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Karlsson | 2026-02-13 06:48:21 | Re: Questionable description about character sets |
| Previous Message | Michael Paquier | 2026-02-13 06:18:44 | Re: recovery.signal not cleaned up when both signal files are present |