From f9793e5fe924b49e1cad93f7d33ed313283c51f7 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Fri, 10 Jul 2026 14:22:54 +0900 Subject: [PATCH v1] postgres_fdw: Mark statistics import helpers as static The set_*_arg helper functions in postgres_fdw.c are declared static, but their definitions omitted the static keyword. Add it to make their file-local scope explicit and keep the declarations and definitions consistent. Also fix a couple of nearby comment typos. --- contrib/postgres_fdw/postgres_fdw.c | 12 ++++++------ src/backend/statistics/attribute_stats.c | 2 +- src/backend/statistics/relation_stats.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index e6e0a4ab9b5..70de942de12 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -6134,7 +6134,7 @@ import_fetched_statistics(Relation relation, } /* - * Conenience routine to fetch the value for the row/column of the PGresult + * Convenience routine to fetch the value for the row/column of the PGresult */ static char * get_opt_value(PGresult *res, int row, int col) @@ -6147,7 +6147,7 @@ get_opt_value(PGresult *res, int row, int col) /* * Convenience routine for setting optional text arguments */ -void +static void set_text_arg(NullableDatum *arg, const char *s) { if (s) @@ -6165,7 +6165,7 @@ set_text_arg(NullableDatum *arg, const char *s) /* * Convenience routine for setting optional int32 arguments */ -void +static void set_int32_arg(NullableDatum *arg, const char *s) { if (s) @@ -6185,7 +6185,7 @@ set_int32_arg(NullableDatum *arg, const char *s) /* * Convenience routine for setting optional uint32 arguments */ -void +static void set_uint32_arg(NullableDatum *arg, const char *s) { if (s) @@ -6205,7 +6205,7 @@ set_uint32_arg(NullableDatum *arg, const char *s) /* * Convenience routine for setting optional float arguments */ -void +static void set_float_arg(NullableDatum *arg, const char *s) { if (s) @@ -6225,7 +6225,7 @@ set_float_arg(NullableDatum *arg, const char *s) /* * Convenience routine for setting optional float[] arguments */ -void +static void set_floatarr_arg(NullableDatum *arg, const char *s) { if (s) diff --git a/src/backend/statistics/attribute_stats.c b/src/backend/statistics/attribute_stats.c index 2efb74b95a6..48e0df391e2 100644 --- a/src/backend/statistics/attribute_stats.c +++ b/src/backend/statistics/attribute_stats.c @@ -708,7 +708,7 @@ pg_restore_attribute_stats(PG_FUNCTION_ARGS) } /* - * Import attribute statistics from NullableDatum inputs for all statitical + * Import attribute statistics from NullableDatum inputs for all statistical * values. * * For now, the 'version' argument is ignored. In the future it can be used diff --git a/src/backend/statistics/relation_stats.c b/src/backend/statistics/relation_stats.c index 990a7511d04..fbaab92284f 100644 --- a/src/backend/statistics/relation_stats.c +++ b/src/backend/statistics/relation_stats.c @@ -256,7 +256,7 @@ pg_restore_relation_stats(PG_FUNCTION_ARGS) } /* - * Import relation statistics from NullableDatum inputs for all statitical + * Import relation statistics from NullableDatum inputs for all statistical * values. * * For now, the 'version' argument is ignored. In the future it can be used -- 2.55.0