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

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter@eisentraut.org>
Date: 2025-09-26T05:56:30Z
Lists: pgsql-hackers

Attachments

Hi Hackers,

I noticed that many functions take "Datum *" parameters while they don't
update the data. So I created this patch to change "Datum *" to "const
Datum *" wherever possible, which should improve type safety and make the
interfaces clearer about their intent, also helps the compiler catch
accidental modifications.

Best regards,
Chao Li
---------------------
HighGo Software Co., Ltd.
https://www.highgo.com/

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Mark function arguments of type "Datum *" as "const Datum *" where possible