From b575a26c66e438225f1c0f95ed8c5efc793d3a14 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Thu, 24 Aug 2023 11:53:42 +0200 Subject: [PATCH] Add proargnames to multi-argument aggregate functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having argument names makes it easier to understand how to use the aggregate functions when inspecting them with \dfa or similar. Author: Dagfinn Ilmari Mannsåker Reviewed-by: Vik Fearing Reviewed-by: Jim Jones Discussion: https://postgr.es/m/877cw3jl8y.fsf@wibble.ilmari.org --- src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_proc.dat | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index d1f8107d26..e2a070984b 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202308231 +#define CATALOG_VERSION_NO 202308241 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index e893b49eb8..9805bc6118 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -5004,7 +5004,7 @@ { oid => '3538', descr => 'concatenate aggregate input into a string', proname => 'string_agg', prokind => 'a', proisstrict => 'f', prorettype => 'text', proargtypes => 'text text', - prosrc => 'aggregate_dummy' }, + proargnames => '{value,delimiter}', prosrc => 'aggregate_dummy' }, { oid => '3543', descr => 'aggregate transition function', proname => 'bytea_string_agg_transfn', proisstrict => 'f', prorettype => 'internal', proargtypes => 'internal bytea bytea', @@ -5016,7 +5016,7 @@ { oid => '3545', descr => 'concatenate aggregate input into a bytea', proname => 'string_agg', prokind => 'a', proisstrict => 'f', prorettype => 'bytea', proargtypes => 'bytea bytea', - prosrc => 'aggregate_dummy' }, + proargnames => '{value,delimiter}', prosrc => 'aggregate_dummy' }, # To ASCII conversion { oid => '1845', descr => 'encode text from DB encoding to ASCII text', @@ -8971,21 +8971,22 @@ { oid => '3197', descr => 'aggregate input into a json object', proname => 'json_object_agg', prokind => 'a', proisstrict => 'f', provolatile => 's', prorettype => 'json', proargtypes => 'any any', - prosrc => 'aggregate_dummy' }, + proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6280', descr => 'aggregate non-NULL input into a json object', proname => 'json_object_agg_strict', prokind => 'a', proisstrict => 'f', provolatile => 's', prorettype => 'json', proargtypes => 'any any', - prosrc => 'aggregate_dummy' }, + proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6281', descr => 'aggregate input into a json object with unique keys', proname => 'json_object_agg_unique', prokind => 'a', proisstrict => 'f', provolatile => 's', prorettype => 'json', proargtypes => 'any any', - prosrc => 'aggregate_dummy' }, + proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6282', descr => 'aggregate non-NULL input into a json object with unique keys', proname => 'json_object_agg_unique_strict', prokind => 'a', proisstrict => 'f', provolatile => 's', prorettype => 'json', - proargtypes => 'any any', prosrc => 'aggregate_dummy' }, + proargtypes => 'any any', proargnames => '{key,value}', + prosrc => 'aggregate_dummy' }, { oid => '3198', descr => 'build a json array from any inputs', proname => 'json_build_array', provariadic => 'any', proisstrict => 'f', provolatile => 's', prorettype => 'json', proargtypes => 'any', @@ -9899,22 +9900,22 @@ prosrc => 'jsonb_object_agg_finalfn' }, { oid => '3270', descr => 'aggregate inputs into jsonb object', proname => 'jsonb_object_agg', prokind => 'a', proisstrict => 'f', - prorettype => 'jsonb', proargtypes => 'any any', + prorettype => 'jsonb', proargtypes => 'any any', proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6288', descr => 'aggregate non-NULL inputs into jsonb object', proname => 'jsonb_object_agg_strict', prokind => 'a', proisstrict => 'f', - prorettype => 'jsonb', proargtypes => 'any any', + prorettype => 'jsonb', proargtypes => 'any any', proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6289', descr => 'aggregate inputs into jsonb object checking key uniqueness', proname => 'jsonb_object_agg_unique', prokind => 'a', proisstrict => 'f', - prorettype => 'jsonb', proargtypes => 'any any', + prorettype => 'jsonb', proargtypes => 'any any', proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '6290', descr => 'aggregate non-NULL inputs into jsonb object checking key uniqueness', proname => 'jsonb_object_agg_unique_strict', prokind => 'a', proisstrict => 'f', prorettype => 'jsonb', proargtypes => 'any any', - prosrc => 'aggregate_dummy' }, + proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '3271', descr => 'build a jsonb array from any inputs', proname => 'jsonb_build_array', provariadic => 'any', proisstrict => 'f', provolatile => 's', prorettype => 'jsonb', proargtypes => 'any',