Skip to content

Commit

Permalink
Add proargnames to multi-argument aggregate functions
Browse files Browse the repository at this point in the history
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 <ilmari@ilmari.org>
Reviewed-by: Vik Fearing <vik@postgresfriends.org>
Reviewed-by: Jim Jones <jim.jones@uni-muenster.de>
Discussion: https://postgr.es/m/877cw3jl8y.fsf@wibble.ilmari.org
  • Loading branch information
danielgustafsson committed Aug 24, 2023
1 parent 27449cc commit b575a26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/include/catalog/catversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
*/

/* yyyymmddN */
#define CATALOG_VERSION_NO 202308231
#define CATALOG_VERSION_NO 202308241

#endif
21 changes: 11 additions & 10 deletions src/include/catalog/pg_proc.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit b575a26

Please sign in to comment.