agora inbox for pgsql-hackers@postgresql.orghelp / color / mirror / Atom feed
[PATCH v4] Add argument names to multi-argument aggregates 3+ messages / 1 participants [nested] [flat]
* [PATCH v4] Add argument names to multi-argument aggregates @ 2023-02-27 13:06 Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> 0 siblings, 0 replies; 3+ messages in thread From: Dagfinn Ilmari Mannsåker @ 2023-02-27 13:06 UTC (permalink / raw) This makes it easier to see which way around the arguments go when using \dfa. This is particularly relevant for string_agg(), but add it to json(b)_object_agg() too for good measure. --- src/include/catalog/pg_proc.dat | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 6996073989..3e283671dc 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -4992,7 +4992,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', @@ -5004,7 +5004,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', @@ -8953,21 +8953,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', @@ -9881,22 +9882,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', -- 2.39.2 --=-=-=-- ^ permalink raw reply [nested|flat] 3+ messages in thread
* [RFC PATCH v2] Add argument names to multi-argument aggregates @ 2023-02-27 13:06 Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> 0 siblings, 0 replies; 3+ messages in thread From: Dagfinn Ilmari Mannsåker @ 2023-02-27 13:06 UTC (permalink / raw) This makes it easier to see which way around the arguments go when using \dfa. This is particularly relevant for string_agg(), but add it to json(b)_object_agg() too for good measure. --- src/include/catalog/pg_proc.dat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index b516cee8bd..b2db8d07e1 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -5017,7 +5017,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', @@ -5029,7 +5029,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', @@ -8978,7 +8978,7 @@ { 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 => '8955', 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', @@ -9906,7 +9906,7 @@ 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 => '8963', descr => 'aggregate non-NULL inputs into jsonb object', proname => 'jsonb_object_agg_strict', prokind => 'a', proisstrict => 'f', -- 2.39.2 --=-=-=-- ^ permalink raw reply [nested|flat] 3+ messages in thread
* [PATCH] Add argument names to multi-argument aggregates @ 2023-02-27 13:06 Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> 0 siblings, 0 replies; 3+ messages in thread From: Dagfinn Ilmari Mannsåker @ 2023-02-27 13:06 UTC (permalink / raw) This makes it easier to see which way around the arguments go when using \dfa. This is particularly relevant for string_agg(), but add it to json(b)_object_agg() too for good measure. --- src/include/catalog/pg_proc.dat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index e2a7642a2b..f96d29278f 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -4988,6 +4988,7 @@ { oid => '3538', descr => 'concatenate aggregate input into a string', proname => 'string_agg', prokind => 'a', proisstrict => 'f', prorettype => 'text', proargtypes => 'text text', + proargnames => '{value,delimiter}', prosrc => 'aggregate_dummy' }, { oid => '3543', descr => 'aggregate transition function', proname => 'bytea_string_agg_transfn', proisstrict => 'f', @@ -5000,6 +5001,7 @@ { oid => '3545', descr => 'concatenate aggregate input into a bytea', proname => 'string_agg', prokind => 'a', proisstrict => 'f', prorettype => 'bytea', proargtypes => 'bytea bytea', + proargnames => '{value,delimiter}', prosrc => 'aggregate_dummy' }, # To ASCII conversion @@ -8899,6 +8901,7 @@ { oid => '3197', descr => 'aggregate input into a json object', proname => 'json_object_agg', prokind => 'a', proisstrict => 'f', provolatile => 's', prorettype => 'json', 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', @@ -9791,6 +9794,7 @@ { oid => '3270', descr => 'aggregate inputs into jsonb object', proname => 'jsonb_object_agg', prokind => 'a', proisstrict => 'f', prorettype => 'jsonb', proargtypes => 'any any', + proargnames => '{key,value}', prosrc => 'aggregate_dummy' }, { oid => '3271', descr => 'build a jsonb array from any inputs', proname => 'jsonb_build_array', provariadic => 'any', proisstrict => 'f', -- 2.39.1 --=-=-=-- ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-02-27 13:06 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-02-27 13:06 [PATCH v4] Add argument names to multi-argument aggregates Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> 2023-02-27 13:06 [RFC PATCH v2] Add argument names to multi-argument aggregates Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> 2023-02-27 13:06 [PATCH] Add argument names to multi-argument aggregates Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox