From: Peter Eisentraut Date: Mon, 4 May 2026 09:53:04 +0000 (+0200) Subject: Add missing serial commas X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b83a94a73bc3488119bb2517b0c1406be8a50545;p=thirdparty%2Fpostgresql.git Add missing serial commas --- diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c index 26a78913cc8..8537d9e2409 100644 --- a/src/backend/statistics/extended_stats_funcs.c +++ b/src/backend/statistics/extended_stats_funcs.c @@ -520,7 +520,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) { ereport(WARNING, errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot specify parameters \"%s\", \"%s\" or \"%s\"", + errmsg("cannot specify parameters \"%s\", \"%s\", or \"%s\"", extarginfo[MOST_COMMON_VALS_ARG].argname, extarginfo[MOST_COMMON_FREQS_ARG].argname, extarginfo[MOST_COMMON_BASE_FREQS_ARG].argname), @@ -544,7 +544,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) { ereport(WARNING, errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not use \"%s\", \"%s\" and \"%s\": missing one or more parameters", + errmsg("could not use \"%s\", \"%s\", and \"%s\": missing one or more parameters", extarginfo[MOST_COMMON_VALS_ARG].argname, extarginfo[MOST_COMMON_FREQS_ARG].argname, extarginfo[MOST_COMMON_BASE_FREQS_ARG].argname)); diff --git a/src/backend/utils/adt/pg_dependencies.c b/src/backend/utils/adt/pg_dependencies.c index d8bd1c4a168..7441004909f 100644 --- a/src/backend/utils/adt/pg_dependencies.c +++ b/src/backend/utils/adt/pg_dependencies.c @@ -396,7 +396,7 @@ dependencies_object_field_start(void *state, char *fname, bool isnull) errsave(parse->escontext, errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("malformed pg_dependencies: \"%s\"", parse->str), - errdetail("Only allowed keys are \"%s\", \"%s\" and \"%s\".", + errdetail("Only allowed keys are \"%s\", \"%s\", and \"%s\".", PG_DEPENDENCIES_KEY_ATTRIBUTES, PG_DEPENDENCIES_KEY_DEPENDENCY, PG_DEPENDENCIES_KEY_DEGREE)); diff --git a/src/test/regress/expected/pg_dependencies.out b/src/test/regress/expected/pg_dependencies.out index f619982a691..708a07e22a4 100644 --- a/src/test/regress/expected/pg_dependencies.out +++ b/src/test/regress/expected/pg_dependencies.out @@ -60,22 +60,22 @@ SELECT '[{"attributes_invalid" : [2,3], "dependency" : 4}]'::pg_dependencies; ERROR: malformed pg_dependencies: "[{"attributes_invalid" : [2,3], "dependency" : 4}]" LINE 1: SELECT '[{"attributes_invalid" : [2,3], "dependency" : 4}]':... ^ -DETAIL: Only allowed keys are "attributes", "dependency" and "degree". +DETAIL: Only allowed keys are "attributes", "dependency", and "degree". SELECT '[{"attributes" : [2,3], "invalid" : 3, "dependency" : 4}]'::pg_dependencies; ERROR: malformed pg_dependencies: "[{"attributes" : [2,3], "invalid" : 3, "dependency" : 4}]" LINE 1: SELECT '[{"attributes" : [2,3], "invalid" : 3, "dependency" ... ^ -DETAIL: Only allowed keys are "attributes", "dependency" and "degree". +DETAIL: Only allowed keys are "attributes", "dependency", and "degree". SELECT * FROM pg_input_error_info('[{"attributes_invalid" : [2,3], "dependency" : 4}]', 'pg_dependencies'); - message | detail | hint | sql_error_code ----------------------------------------------------------------------------------+----------------------------------------------------------------+------+---------------- - malformed pg_dependencies: "[{"attributes_invalid" : [2,3], "dependency" : 4}]" | Only allowed keys are "attributes", "dependency" and "degree". | | 22P02 + message | detail | hint | sql_error_code +---------------------------------------------------------------------------------+-----------------------------------------------------------------+------+---------------- + malformed pg_dependencies: "[{"attributes_invalid" : [2,3], "dependency" : 4}]" | Only allowed keys are "attributes", "dependency", and "degree". | | 22P02 (1 row) SELECT * FROM pg_input_error_info('[{"attributes" : [2,3], "invalid" : 3, "dependency" : 4}]', 'pg_dependencies'); - message | detail | hint | sql_error_code -----------------------------------------------------------------------------------------+----------------------------------------------------------------+------+---------------- - malformed pg_dependencies: "[{"attributes" : [2,3], "invalid" : 3, "dependency" : 4}]" | Only allowed keys are "attributes", "dependency" and "degree". | | 22P02 + message | detail | hint | sql_error_code +----------------------------------------------------------------------------------------+-----------------------------------------------------------------+------+---------------- + malformed pg_dependencies: "[{"attributes" : [2,3], "invalid" : 3, "dependency" : 4}]" | Only allowed keys are "attributes", "dependency", and "degree". | | 22P02 (1 row) -- Missing keys diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out index fd660791ea9..fb2b22e7e55 100644 --- a/src/test/regress/expected/stats_import.out +++ b/src/test/regress/expected/stats_import.out @@ -2021,7 +2021,7 @@ SELECT pg_catalog.pg_restore_extended_stats( {two,"(2,2.2,TWO,02-02-2002,\"[true, 4, \"\"six\"\"]\")"}}'::text[], 'most_common_freqs', '{0.25,0.25,0.25,0.25}'::double precision[], 'most_common_base_freqs', '{0.0625,0.0625,0.0625,0.0625}'::double precision[]); -WARNING: cannot specify parameters "most_common_vals", "most_common_freqs" or "most_common_base_freqs" +WARNING: cannot specify parameters "most_common_vals", "most_common_freqs", or "most_common_base_freqs" HINT: Extended statistics object "stats_import.test_stat_dependencies" does not support statistics of this type. pg_restore_extended_stats --------------------------- @@ -2037,7 +2037,7 @@ SELECT pg_catalog.pg_restore_extended_stats( 'inherited', false, 'most_common_freqs', '{0.25,0.25,0.25,0.25}'::double precision[], 'most_common_base_freqs', '{0.0625,0.0625,0.0625,0.0625}'::double precision[]); -WARNING: could not use "most_common_vals", "most_common_freqs" and "most_common_base_freqs": missing one or more parameters +WARNING: could not use "most_common_vals", "most_common_freqs", and "most_common_base_freqs": missing one or more parameters pg_restore_extended_stats --------------------------- f @@ -2054,7 +2054,7 @@ SELECT pg_catalog.pg_restore_extended_stats( {tre,"(3,3.3,TRE,03-03-2003,)"}, {two,"(2,2.2,TWO,02-02-2002,\"[true, 4, \"\"six\"\"]\")"}}'::text[], 'most_common_base_freqs', '{0.0625,0.0625,0.0625,0.0625}'::double precision[]); -WARNING: could not use "most_common_vals", "most_common_freqs" and "most_common_base_freqs": missing one or more parameters +WARNING: could not use "most_common_vals", "most_common_freqs", and "most_common_base_freqs": missing one or more parameters pg_restore_extended_stats --------------------------- f @@ -2071,7 +2071,7 @@ SELECT pg_catalog.pg_restore_extended_stats( {tre,"(3,3.3,TRE,03-03-2003,)"}, {two,"(2,2.2,TWO,02-02-2002,\"[true, 4, \"\"six\"\"]\")"}}'::text[], 'most_common_freqs', '{0.25,0.25,0.25,0.25}'::double precision[]); -WARNING: could not use "most_common_vals", "most_common_freqs" and "most_common_base_freqs": missing one or more parameters +WARNING: could not use "most_common_vals", "most_common_freqs", and "most_common_base_freqs": missing one or more parameters pg_restore_extended_stats --------------------------- f