From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change InputFunctionCall* to take a const char *str
Date: Tue, 25 Aug 2026 08:40:26 +0000
Message-ID: <E1wymhk-0000000225l-4BZP@gemulon.postgresql.org> (raw)
Change InputFunctionCall* to take a const char *str
It's reasonable to specify that the input string passed to these
functions isn't modified.
In each case, the input string is passed down to CStringGetDatum(),
which already takes a const char *, so this change just pushes that
API specification one level up.
A couple of callers benefit from this by no longer having to cast away
a const qualifier.
A few more functions that call input functions internally are changed
so that they can now offer a const qualified input string to their
callers.
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://www.postgresql.org/message-id/flat/459217ca-3840-4452-8cd1-8f9b47e8d479%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5767fece95ccb58c25cee0567dd83457b8e15b37
Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 4 ++--
src/backend/bootstrap/bootstrap.c | 6 +++---
src/backend/parser/parse_type.c | 2 +-
src/backend/statistics/extended_stats_funcs.c | 2 +-
src/backend/utils/adt/domains.c | 2 +-
src/backend/utils/adt/rowtypes.c | 2 +-
src/backend/utils/fmgr/fmgr.c | 8 ++++----
src/include/bootstrap/bootstrap.h | 2 +-
src/include/fmgr.h | 8 ++++----
src/include/parser/parse_type.h | 2 +-
10 files changed, 19 insertions(+), 19 deletions(-)
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-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Change InputFunctionCall* to take a const char *str
In-Reply-To: <E1wymhk-0000000225l-4BZP@gemulon.postgresql.org>
* 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