| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Change InputFunctionCall* to take a const char *str |
| Date: | 2026-08-25 08:40:26 |
| Message-ID: | E1wymhk-0000000225l-4BZP@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)iki(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2026-08-25 08:42:26 | pgsql: pgcrypto: Consistent spelling of built-in |
| Previous Message | Peter Eisentraut | 2026-08-25 08:25:27 | pgsql: Fix some -Wcast-qual warnings |