Re: Mark function arguments of type "Datum *" as "const Datum *" where possible

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Mark function arguments of type "Datum *" as "const Datum *" where possible
Date: 2025-09-26 15:00:13
Message-ID: 4061336.1758898813@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> I have mixed feelings about this patch. I have no concrete objections to
> the technical content, but some questions come to mind. For example, why
> are we only fixing Datum parameters?

Yeah. In particular, probably 99% of such Datum arrays also have an
associated array of bool isnull flags. IMO it makes exactly zero
sense to const-ify the Datums without similar protection for their
isnull flags.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-09-26 15:02:05 Re: Remove unused for_all_tables field from AlterPublicationStmt
Previous Message Vladlen Popolitov 2025-09-26 14:58:01 Re: Avoiding roundoff error in pg_sleep()