From 736ff000500d8d87499eaef0fb7331960173c4e8 Mon Sep 17 00:00:00 2001 From: jian he Date: Mon, 21 Jul 2025 11:58:37 +0800 Subject: [PATCH v6 1/2] add function argument name to substr. HEAD \df substr List of functions Schema | Name | Result data type | Argument data types | Type ------------+--------+------------------+-------------------------+------ pg_catalog | substr | bytea | bytea, integer | func pg_catalog | substr | bytea | bytea, integer, integer | func pg_catalog | substr | text | text, integer | func pg_catalog | substr | text | text, integer, integer | func with patch \df substr List of functions Schema | Name | Result data type | Argument data types | Type ------------+--------+------------------+-------------------------------------------+------ pg_catalog | substr | bytea | bytes bytea, start integer | func pg_catalog | substr | bytea | bytes bytea, start integer, count integer | func pg_catalog | substr | text | string text, start integer | func pg_catalog | substr | text | string text, start integer, count integer | func discussion: https://postgr.es/m/CACJufxHTBkymh06D4mGKNe1YfRNFN+gFBybmygWk=PtMqu00LQ@mail.gmail.com --- 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 1fc19146f46..2f29f3757a5 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -3706,6 +3706,7 @@ prosrc => 'rtrim' }, { oid => '877', descr => 'extract portion of string', proname => 'substr', prorettype => 'text', proargtypes => 'text int4 int4', + proargnames => '{string, start, count}', prosrc => 'text_substr' }, { oid => '878', descr => 'map a set of characters appearing in string', proname => 'translate', prorettype => 'text', proargtypes => 'text text text', @@ -3724,6 +3725,7 @@ prosrc => 'rtrim1' }, { oid => '883', descr => 'extract portion of string', proname => 'substr', prorettype => 'text', proargtypes => 'text int4', + proargnames => '{string, start}', prosrc => 'text_substr_no_len' }, { oid => '884', descr => 'trim selected characters from both ends of string', proname => 'btrim', prorettype => 'text', proargtypes => 'text text', @@ -6286,9 +6288,11 @@ prosrc => 'bytea_substr_no_len' }, { oid => '2085', descr => 'extract portion of string', proname => 'substr', prorettype => 'bytea', proargtypes => 'bytea int4 int4', + proargnames => '{bytes, start, count}', prosrc => 'bytea_substr' }, { oid => '2086', descr => 'extract portion of string', proname => 'substr', prorettype => 'bytea', proargtypes => 'bytea int4', + proargnames => '{bytes, start}', prosrc => 'bytea_substr_no_len' }, { oid => '2014', descr => 'position of substring', proname => 'position', prorettype => 'int4', proargtypes => 'bytea bytea', -- 2.34.1