pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedDocumented parameter names differ from callable proargnames for several built-ins
6+ messages / 4 participants
[nested] [flat]
Commits from this thread:
2026-11-03 2af6dd3370 ed0c6d55ab 862a20118c b6090b039b 614347a3a5 c859616f14 62a615e0b0 doc: Match built-in function parameter names to their SQL names
* Documented parameter names differ from callable proargnames for several built-ins
@ 2026-10-31 06:39 Mi cro <micro6947@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Mi cro @ 2026-10-31 06:39 UTC (permalink / raw)
To: pgsql-docs
Hello,
Several built-in functions are documented with parameter names that differ from
the names registered in pg_proc. PostgreSQL supports named-argument calls, so
these differences directly affect whether the documented call can be used.
For example, on PostgreSQL 16.14:
SELECT parse_ident(str => 'a.b');
-- {a,b}
SELECT parse_ident(qualified_identifier => 'a.b');
-- ERROR: function parse_ident(qualified_identifier => unknown) does not exist
The current REL_18_STABLE documentation uses qualified_identifier/strict_mode,
while pg_proc.dat registers the names as str/strict.
The same class of mismatch appears in:
- make_timestamp and make_timestamptz: documentation uses day;
pg_proc uses mday.
- jsonb_set, jsonb_set_lax, and jsonb_insert: documentation uses
target/new_value; the registered names are jsonb_in/replacement.
- table_to_xml, table_to_xmlschema, and table_to_xml_and_xmlschema:
documentation uses table; pg_proc uses tbl.
- pg_logical_emit_message in PG18: documentation uses content; the SQL-visible
name is message for both overloads.
References:
https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html
https://github.com/postgres/postgres/blob/REL_18_STABLE/doc/src/sgml/func.sgml
https://github.com/postgres/postgres/blob/REL_18_STABLE/src/include/catalog/pg_proc.dat
https://github.com/postgres/postgres/blob/REL_18_STABLE/src/backend/catalog/system_functions.sql
I suggest updating the displayed names to the SQL-visible parameter names.
Renaming the runtime parameters would change named-call compatibility.
Regards
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Documented parameter names differ from callable proargnames for several built-ins
@ 2026-11-01 17:50 Fujii Masao <masao.fujii@gmail.com>
parent: Mi cro <micro6947@gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Fujii Masao @ 2026-11-01 17:50 UTC (permalink / raw)
To: Mi cro <micro6947@gmail.com>; +Cc: pgsql-docs
On Sat, Oct 31, 2026 at 6:50 PM Mi cro <micro6947@gmail.com> wrote:
> I suggest updating the displayed names to the SQL-visible parameter names.
> Renaming the runtime parameters would change named-call compatibility.
Thanks for the report and suggestion!
I also found the same issue in pg_input_error_info(), ts_parse(), and ts_stat().
The attached patch fixes the reported issue and updates these three functions
as well.
Regards,
--
Fujii Masao
Attachments: download all (5 files, .tar.gz)
nocfbot-v1-0001-PG15-PG14-doc-Match-built-in-function-parameter-names-to-th.patch (application/octet-stream, 17.6K) download
From 2699190077352ccc69eae43f8cbe4ba56369fe4e Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Nov 2026 00:56:18 +0900
Subject: [PATCH v1] doc: Match built-in function parameter names to their SQL
names
Several documented function signatures used parameter names that
differed from the registered SQL names, causing named-argument calls
using the documented names to fail. Update the signatures and
corresponding descriptions to use the SQL-visible names, without
affecting existing calls.
Backpatch to all supported versions, except for the changes to
pg_logical_emit_message and pg_input_error_info, which are
backpatched through v17 and v16, respectively.
Reported-by: Mi cro <micro6947@gmail.com>
Author: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/19D9D4CB-8C31-493E-982A-1E17042D68C5%40gmail.com
Backpatch-through: 14
---
doc/src/sgml/func.sgml | 60 ++++++++++++++++++------------------
doc/src/sgml/textsearch.sgml | 10 +++---
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 5d3871ed503..e2c39609f03 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -3023,13 +3023,13 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
<indexterm>
<primary>parse_ident</primary>
</indexterm>
- <function>parse_ident</function> ( <parameter>qualified_identifier</parameter> <type>text</type>
- [, <parameter>strict_mode</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
+ <function>parse_ident</function> ( <parameter>str</parameter> <type>text</type>
+ [, <parameter>strict</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
<returnvalue>text[]</returnvalue>
</para>
<para>
- Splits <parameter>qualified_identifier</parameter> into an array of
- identifiers, removing any quoting of individual identifiers. By
+ Splits the qualified identifier <parameter>str</parameter> into an
+ array of identifiers, removing any quoting of individual identifiers. By
default, extra characters after the last identifier are considered an
error; but if the second parameter is <literal>false</literal>, then such
extra characters are ignored. (This behavior is useful for parsing
@@ -9593,7 +9593,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamp</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type> )
@@ -9616,7 +9616,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamptz</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type>
@@ -13743,13 +13743,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<primary>ts_parse</primary>
</indexterm>
<function>ts_parse</function> ( <parameter>parser_name</parameter> <type>text</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using the
+ Extracts tokens from the document <parameter>txt</parameter> using the
named parser.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -13762,13 +13762,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>ts_parse</function> ( <parameter>parser_oid</parameter> <type>oid</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using a
+ Extracts tokens from the document <parameter>txt</parameter> using a
parser specified by OID.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -13824,7 +13824,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<indexterm>
<primary>ts_stat</primary>
</indexterm>
- <function>ts_stat</function> ( <parameter>sqlquery</parameter> <type>text</type>
+ <function>ts_stat</function> ( <parameter>query</parameter> <type>text</type>
<optional>, <parameter>weights</parameter> <type>text</type> </optional> )
<returnvalue>setof record</returnvalue>
( <parameter>word</parameter> <type>text</type>,
@@ -13832,7 +13832,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<parameter>nentry</parameter> <type>integer</type> )
</para>
<para>
- Executes the <parameter>sqlquery</parameter>, which must return a
+ Executes the <parameter>query</parameter>, which must return a
single <type>tsvector</type> column, and returns statistics about each
distinct lexeme contained in the data.
See <xref linkend="textsearch-statistics"/> for details.
@@ -14876,7 +14876,7 @@ SELECT xmltable.*
The following functions map the contents of relational tables to
XML values. They can be thought of as XML export functionality:
<synopsis>
-<function>table_to_xml</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -14887,7 +14887,7 @@ SELECT xmltable.*
<para>
<function>table_to_xml</function> maps the content of the named
- table, passed as parameter <parameter>table</parameter>. The
+ table, passed as parameter <parameter>tbl</parameter>. The
<type>regclass</type> type accepts strings identifying tables using the
usual notation, including optional schema qualification and
double quotes (see <xref linkend="datatype-oid"/> for details).
@@ -14978,7 +14978,7 @@ SELECT xmltable.*
The following functions return XML Schema documents describing the
mappings performed by the corresponding functions above:
<synopsis>
-<function>table_to_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -14995,7 +14995,7 @@ SELECT xmltable.*
together. They can be useful where self-contained and
self-describing results are wanted:
<synopsis>
-<function>table_to_xml_and_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml_and_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml_and_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -16279,19 +16279,19 @@ table2-mapping
<indexterm>
<primary>jsonb_set</primary>
</indexterm>
- <function>jsonb_set</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_set</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
+ Returns <parameter>jsonb_in</parameter>
with the item designated by <parameter>path</parameter>
- replaced by <parameter>new_value</parameter>, or with
- <parameter>new_value</parameter> added if
+ replaced by <parameter>replacement</parameter>, or with
+ <parameter>replacement</parameter> added if
<parameter>create_if_missing</parameter> is true (which is the
default) and the item designated by <parameter>path</parameter>
does not exist.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -16315,11 +16315,11 @@ table2-mapping
<indexterm>
<primary>jsonb_set_lax</primary>
</indexterm>
- <function>jsonb_set_lax</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
+ <function>jsonb_set_lax</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- If <parameter>new_value</parameter> is not <literal>NULL</literal>,
+ If <parameter>replacement</parameter> is not <literal>NULL</literal>,
behaves identically to <literal>jsonb_set</literal>. Otherwise behaves
according to the value
of <parameter>null_value_treatment</parameter> which must be one
@@ -16343,22 +16343,22 @@ table2-mapping
<indexterm>
<primary>jsonb_insert</primary>
</indexterm>
- <function>jsonb_insert</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_insert</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
- with <parameter>new_value</parameter> inserted. If the item
+ Returns <parameter>jsonb_in</parameter>
+ with <parameter>replacement</parameter> inserted. If the item
designated by the <parameter>path</parameter> is an array
- element, <parameter>new_value</parameter> will be inserted before
+ element, <parameter>replacement</parameter> will be inserted before
that item if <parameter>insert_after</parameter> is false (which
is the default), or after it
if <parameter>insert_after</parameter> is true. If the item
designated by the <parameter>path</parameter> is an object
- field, <parameter>new_value</parameter> will be inserted only if
+ field, <parameter>replacement</parameter> will be inserted only if
the object does not already contain that key.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -26818,7 +26818,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset((pg_backup_stop()).lsn);
reads the record. The <parameter>prefix</parameter> parameter is a
textual prefix that can be used by logical decoding plugins to easily
recognize messages that are interesting for them.
- The <parameter>content</parameter> parameter is the content of the
+ The <parameter>message</parameter> parameter is the content of the
message, given either in text or binary form.
</para></entry>
</row>
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 206f2d783ae..06d7c76dd2d 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2007,13 +2007,13 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
</para>
<synopsis>
-ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
+ts_stat(<replaceable class="parameter">query</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>,
OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type>
</synopsis>
<para>
- <replaceable>sqlquery</replaceable> is a text value containing an SQL
+ <replaceable>query</replaceable> is a text value containing an SQL
query which must return a single <type>tsvector</type> column.
<function>ts_stat</function> executes the query and returns statistics about
each distinct lexeme (word) contained in the <type>tsvector</type>
@@ -3496,14 +3496,14 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
</indexterm>
<synopsis>
-ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
-ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
</synopsis>
<para>
- <function>ts_parse</function> parses the given <replaceable>document</replaceable>
+ <function>ts_parse</function> parses the document <replaceable>txt</replaceable>
and returns a series of records, one for each token produced by
parsing. Each record includes a <varname>tokid</varname> showing the
assigned token type and a <varname>token</varname> which is the text of the
--
2.56.0
nocfbot-v1-0001-PG17-doc-Match-built-in-function-parameter-names-to-th.patch (application/octet-stream, 20.5K) download
From 35d944039afd0ee12fc2f6e485fc6fd706123483 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Nov 2026 00:56:18 +0900
Subject: [PATCH v1] doc: Match built-in function parameter names to their SQL
names
Several documented function signatures used parameter names that
differed from the registered SQL names, causing named-argument calls
using the documented names to fail. Update the signatures and
corresponding descriptions to use the SQL-visible names, without
affecting existing calls.
Backpatch to all supported versions, except for the changes to
pg_logical_emit_message and pg_input_error_info, which are
backpatched through v17 and v16, respectively.
Reported-by: Mi cro <micro6947@gmail.com>
Author: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/19D9D4CB-8C31-493E-982A-1E17042D68C5%40gmail.com
Backpatch-through: 14
---
doc/src/sgml/func.sgml | 70 ++++++++++++++++++------------------
doc/src/sgml/textsearch.sgml | 10 +++---
2 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 78d9469bc92..5feeb286e31 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -3186,13 +3186,13 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in
<indexterm>
<primary>parse_ident</primary>
</indexterm>
- <function>parse_ident</function> ( <parameter>qualified_identifier</parameter> <type>text</type>
- [, <parameter>strict_mode</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
+ <function>parse_ident</function> ( <parameter>str</parameter> <type>text</type>
+ [, <parameter>strict</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
<returnvalue>text[]</returnvalue>
</para>
<para>
- Splits <parameter>qualified_identifier</parameter> into an array of
- identifiers, removing any quoting of individual identifiers. By
+ Splits the qualified identifier <parameter>str</parameter> into an
+ array of identifiers, removing any quoting of individual identifiers. By
default, extra characters after the last identifier are considered an
error; but if the second parameter is <literal>false</literal>, then such
extra characters are ignored. (This behavior is useful for parsing
@@ -9818,7 +9818,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamp</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type> )
@@ -9841,7 +9841,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamptz</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type>
@@ -14060,13 +14060,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<primary>ts_parse</primary>
</indexterm>
<function>ts_parse</function> ( <parameter>parser_name</parameter> <type>text</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using the
+ Extracts tokens from the document <parameter>txt</parameter> using the
named parser.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -14079,13 +14079,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>ts_parse</function> ( <parameter>parser_oid</parameter> <type>oid</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using a
+ Extracts tokens from the document <parameter>txt</parameter> using a
parser specified by OID.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -14141,7 +14141,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<indexterm>
<primary>ts_stat</primary>
</indexterm>
- <function>ts_stat</function> ( <parameter>sqlquery</parameter> <type>text</type>
+ <function>ts_stat</function> ( <parameter>query</parameter> <type>text</type>
<optional>, <parameter>weights</parameter> <type>text</type> </optional> )
<returnvalue>setof record</returnvalue>
( <parameter>word</parameter> <type>text</type>,
@@ -14149,7 +14149,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<parameter>nentry</parameter> <type>integer</type> )
</para>
<para>
- Executes the <parameter>sqlquery</parameter>, which must return a
+ Executes the <parameter>query</parameter>, which must return a
single <type>tsvector</type> column, and returns statistics about each
distinct lexeme contained in the data.
See <xref linkend="textsearch-statistics"/> for details.
@@ -15253,7 +15253,7 @@ SELECT xmltable.*
The following functions map the contents of relational tables to
XML values. They can be thought of as XML export functionality:
<synopsis>
-<function>table_to_xml</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15264,7 +15264,7 @@ SELECT xmltable.*
<para>
<function>table_to_xml</function> maps the content of the named
- table, passed as parameter <parameter>table</parameter>. The
+ table, passed as parameter <parameter>tbl</parameter>. The
<type>regclass</type> type accepts strings identifying tables using the
usual notation, including optional schema qualification and
double quotes (see <xref linkend="datatype-oid"/> for details).
@@ -15355,7 +15355,7 @@ SELECT xmltable.*
The following functions return XML Schema documents describing the
mappings performed by the corresponding functions above:
<synopsis>
-<function>table_to_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15372,7 +15372,7 @@ SELECT xmltable.*
together. They can be useful where self-contained and
self-describing results are wanted:
<synopsis>
-<function>table_to_xml_and_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml_and_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml_and_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -16983,19 +16983,19 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set</primary>
</indexterm>
- <function>jsonb_set</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_set</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
+ Returns <parameter>jsonb_in</parameter>
with the item designated by <parameter>path</parameter>
- replaced by <parameter>new_value</parameter>, or with
- <parameter>new_value</parameter> added if
+ replaced by <parameter>replacement</parameter>, or with
+ <parameter>replacement</parameter> added if
<parameter>create_if_missing</parameter> is true (which is the
default) and the item designated by <parameter>path</parameter>
does not exist.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -17019,11 +17019,11 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set_lax</primary>
</indexterm>
- <function>jsonb_set_lax</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
+ <function>jsonb_set_lax</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- If <parameter>new_value</parameter> is not <literal>NULL</literal>,
+ If <parameter>replacement</parameter> is not <literal>NULL</literal>,
behaves identically to <literal>jsonb_set</literal>. Otherwise behaves
according to the value
of <parameter>null_value_treatment</parameter> which must be one
@@ -17047,22 +17047,22 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_insert</primary>
</indexterm>
- <function>jsonb_insert</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_insert</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
- with <parameter>new_value</parameter> inserted. If the item
+ Returns <parameter>jsonb_in</parameter>
+ with <parameter>replacement</parameter> inserted. If the item
designated by the <parameter>path</parameter> is an array
- element, <parameter>new_value</parameter> will be inserted before
+ element, <parameter>replacement</parameter> will be inserted before
that item if <parameter>insert_after</parameter> is false (which
is the default), or after it
if <parameter>insert_after</parameter> is true. If the item
designated by the <parameter>path</parameter> is an object
- field, <parameter>new_value</parameter> will be inserted only if
+ field, <parameter>replacement</parameter> will be inserted only if
the object does not already contain that key.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -26977,8 +26977,8 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
<primary>pg_input_error_info</primary>
</indexterm>
<function>pg_input_error_info</function> (
- <parameter>string</parameter> <type>text</type>,
- <parameter>type</parameter> <type>text</type>
+ <parameter>value</parameter> <type>text</type>,
+ <parameter>type_name</parameter> <type>text</type>
)
<returnvalue>record</returnvalue>
( <parameter>message</parameter> <type>text</type>,
@@ -26987,7 +26987,7 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
<parameter>sql_error_code</parameter> <type>text</type> )
</para>
<para>
- Tests whether the given <parameter>string</parameter> is valid
+ Tests whether the given <parameter>value</parameter> is valid
input for the specified data type; if not, return the details of
the error that would have been thrown. If the input is valid, the
results are NULL. The inputs are the same as
@@ -29466,11 +29466,11 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
<indexterm>
<primary>pg_logical_emit_message</primary>
</indexterm>
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>text</type> [, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal>] )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>text</type> [, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal>] )
<returnvalue>pg_lsn</returnvalue>
</para>
<para role="func_signature">
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>bytea</type> [, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal>] )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>bytea</type> [, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal>] )
<returnvalue>pg_lsn</returnvalue>
</para>
<para>
@@ -29482,7 +29482,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
reads the record. The <parameter>prefix</parameter> parameter is a
textual prefix that can be used by logical decoding plugins to easily
recognize messages that are interesting for them.
- The <parameter>content</parameter> parameter is the content of the
+ The <parameter>message</parameter> parameter is the content of the
message, given either in text or binary form.
The <parameter>flush</parameter> parameter (default set to
<literal>false</literal>) controls if the message is immediately
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index db8e40ea7e3..82dc735a452 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2010,13 +2010,13 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
</para>
<synopsis>
-ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
+ts_stat(<replaceable class="parameter">query</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>,
OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type>
</synopsis>
<para>
- <replaceable>sqlquery</replaceable> is a text value containing an SQL
+ <replaceable>query</replaceable> is a text value containing an SQL
query which must return a single <type>tsvector</type> column.
<function>ts_stat</function> executes the query and returns statistics about
each distinct lexeme (word) contained in the <type>tsvector</type>
@@ -3499,14 +3499,14 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
</indexterm>
<synopsis>
-ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
-ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
</synopsis>
<para>
- <function>ts_parse</function> parses the given <replaceable>document</replaceable>
+ <function>ts_parse</function> parses the document <replaceable>txt</replaceable>
and returns a series of records, one for each token produced by
parsing. Each record includes a <varname>tokid</varname> showing the
assigned token type and a <varname>token</varname> which is the text of the
--
2.56.0
nocfbot-v1-0001-PG16-doc-Match-built-in-function-parameter-names-to-th.patch (application/octet-stream, 18.7K) download
From 237a59320661f174bd9b2ea9b4dd4ba176fe7b51 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Nov 2026 00:56:18 +0900
Subject: [PATCH v1] doc: Match built-in function parameter names to their SQL
names
Several documented function signatures used parameter names that
differed from the registered SQL names, causing named-argument calls
using the documented names to fail. Update the signatures and
corresponding descriptions to use the SQL-visible names, without
affecting existing calls.
Backpatch to all supported versions, except for the changes to
pg_logical_emit_message and pg_input_error_info, which are
backpatched through v17 and v16, respectively.
Reported-by: Mi cro <micro6947@gmail.com>
Author: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/19D9D4CB-8C31-493E-982A-1E17042D68C5%40gmail.com
Backpatch-through: 14
---
doc/src/sgml/func.sgml | 66 ++++++++++++++++++------------------
doc/src/sgml/textsearch.sgml | 10 +++---
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 94a91010d40..937c9521186 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -3125,13 +3125,13 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
<indexterm>
<primary>parse_ident</primary>
</indexterm>
- <function>parse_ident</function> ( <parameter>qualified_identifier</parameter> <type>text</type>
- [, <parameter>strict_mode</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
+ <function>parse_ident</function> ( <parameter>str</parameter> <type>text</type>
+ [, <parameter>strict</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> ] )
<returnvalue>text[]</returnvalue>
</para>
<para>
- Splits <parameter>qualified_identifier</parameter> into an array of
- identifiers, removing any quoting of individual identifiers. By
+ Splits the qualified identifier <parameter>str</parameter> into an
+ array of identifiers, removing any quoting of individual identifiers. By
default, extra characters after the last identifier are considered an
error; but if the second parameter is <literal>false</literal>, then such
extra characters are ignored. (This behavior is useful for parsing
@@ -9696,7 +9696,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamp</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type> )
@@ -9719,7 +9719,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamptz</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type>
@@ -13856,13 +13856,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<primary>ts_parse</primary>
</indexterm>
<function>ts_parse</function> ( <parameter>parser_name</parameter> <type>text</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using the
+ Extracts tokens from the document <parameter>txt</parameter> using the
named parser.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -13875,13 +13875,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>ts_parse</function> ( <parameter>parser_oid</parameter> <type>oid</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using a
+ Extracts tokens from the document <parameter>txt</parameter> using a
parser specified by OID.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -13937,7 +13937,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<indexterm>
<primary>ts_stat</primary>
</indexterm>
- <function>ts_stat</function> ( <parameter>sqlquery</parameter> <type>text</type>
+ <function>ts_stat</function> ( <parameter>query</parameter> <type>text</type>
<optional>, <parameter>weights</parameter> <type>text</type> </optional> )
<returnvalue>setof record</returnvalue>
( <parameter>word</parameter> <type>text</type>,
@@ -13945,7 +13945,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<parameter>nentry</parameter> <type>integer</type> )
</para>
<para>
- Executes the <parameter>sqlquery</parameter>, which must return a
+ Executes the <parameter>query</parameter>, which must return a
single <type>tsvector</type> column, and returns statistics about each
distinct lexeme contained in the data.
See <xref linkend="textsearch-statistics"/> for details.
@@ -14989,7 +14989,7 @@ SELECT xmltable.*
The following functions map the contents of relational tables to
XML values. They can be thought of as XML export functionality:
<synopsis>
-<function>table_to_xml</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15000,7 +15000,7 @@ SELECT xmltable.*
<para>
<function>table_to_xml</function> maps the content of the named
- table, passed as parameter <parameter>table</parameter>. The
+ table, passed as parameter <parameter>tbl</parameter>. The
<type>regclass</type> type accepts strings identifying tables using the
usual notation, including optional schema qualification and
double quotes (see <xref linkend="datatype-oid"/> for details).
@@ -15091,7 +15091,7 @@ SELECT xmltable.*
The following functions return XML Schema documents describing the
mappings performed by the corresponding functions above:
<synopsis>
-<function>table_to_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15108,7 +15108,7 @@ SELECT xmltable.*
together. They can be useful where self-contained and
self-describing results are wanted:
<synopsis>
-<function>table_to_xml_and_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml_and_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml_and_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -16589,19 +16589,19 @@ array w/o UK? | t
<indexterm>
<primary>jsonb_set</primary>
</indexterm>
- <function>jsonb_set</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_set</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
+ Returns <parameter>jsonb_in</parameter>
with the item designated by <parameter>path</parameter>
- replaced by <parameter>new_value</parameter>, or with
- <parameter>new_value</parameter> added if
+ replaced by <parameter>replacement</parameter>, or with
+ <parameter>replacement</parameter> added if
<parameter>create_if_missing</parameter> is true (which is the
default) and the item designated by <parameter>path</parameter>
does not exist.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -16625,11 +16625,11 @@ array w/o UK? | t
<indexterm>
<primary>jsonb_set_lax</primary>
</indexterm>
- <function>jsonb_set_lax</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
+ <function>jsonb_set_lax</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- If <parameter>new_value</parameter> is not <literal>NULL</literal>,
+ If <parameter>replacement</parameter> is not <literal>NULL</literal>,
behaves identically to <literal>jsonb_set</literal>. Otherwise behaves
according to the value
of <parameter>null_value_treatment</parameter> which must be one
@@ -16653,22 +16653,22 @@ array w/o UK? | t
<indexterm>
<primary>jsonb_insert</primary>
</indexterm>
- <function>jsonb_insert</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_insert</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
- with <parameter>new_value</parameter> inserted. If the item
+ Returns <parameter>jsonb_in</parameter>
+ with <parameter>replacement</parameter> inserted. If the item
designated by the <parameter>path</parameter> is an array
- element, <parameter>new_value</parameter> will be inserted before
+ element, <parameter>replacement</parameter> will be inserted before
that item if <parameter>insert_after</parameter> is false (which
is the default), or after it
if <parameter>insert_after</parameter> is true. If the item
designated by the <parameter>path</parameter> is an object
- field, <parameter>new_value</parameter> will be inserted only if
+ field, <parameter>replacement</parameter> will be inserted only if
the object does not already contain that key.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -25324,8 +25324,8 @@ SELECT collation for ('foo' COLLATE "de_DE");
<primary>pg_input_error_info</primary>
</indexterm>
<function>pg_input_error_info</function> (
- <parameter>string</parameter> <type>text</type>,
- <parameter>type</parameter> <type>text</type>
+ <parameter>value</parameter> <type>text</type>,
+ <parameter>type_name</parameter> <type>text</type>
)
<returnvalue>record</returnvalue>
( <parameter>message</parameter> <type>text</type>,
@@ -25334,7 +25334,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
<parameter>sql_error_code</parameter> <type>text</type> )
</para>
<para>
- Tests whether the given <parameter>string</parameter> is valid
+ Tests whether the given <parameter>value</parameter> is valid
input for the specified data type; if not, return the details of
the error that would have been thrown. If the input is valid, the
results are NULL. The inputs are the same as
@@ -27633,7 +27633,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
reads the record. The <parameter>prefix</parameter> parameter is a
textual prefix that can be used by logical decoding plugins to easily
recognize messages that are interesting for them.
- The <parameter>content</parameter> parameter is the content of the
+ The <parameter>message</parameter> parameter is the content of the
message, given either in text or binary form.
</para></entry>
</row>
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index db8e40ea7e3..82dc735a452 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2010,13 +2010,13 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
</para>
<synopsis>
-ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
+ts_stat(<replaceable class="parameter">query</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>,
OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type>
</synopsis>
<para>
- <replaceable>sqlquery</replaceable> is a text value containing an SQL
+ <replaceable>query</replaceable> is a text value containing an SQL
query which must return a single <type>tsvector</type> column.
<function>ts_stat</function> executes the query and returns statistics about
each distinct lexeme (word) contained in the <type>tsvector</type>
@@ -3499,14 +3499,14 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
</indexterm>
<synopsis>
-ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
-ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
</synopsis>
<para>
- <function>ts_parse</function> parses the given <replaceable>document</replaceable>
+ <function>ts_parse</function> parses the document <replaceable>txt</replaceable>
and returns a series of records, one for each token produced by
parsing. Each record includes a <varname>tokid</varname> showing the
assigned token type and a <varname>token</varname> which is the text of the
--
2.56.0
nocfbot-v1-0001-PG18-doc-Match-built-in-function-parameter-names-to-th.patch (application/octet-stream, 20.6K) download
From 2064c02e74ff6d137f82ab1eb6272dea382b638a Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Nov 2026 00:56:18 +0900
Subject: [PATCH v1] doc: Match built-in function parameter names to their SQL
names
Several documented function signatures used parameter names that
differed from the registered SQL names, causing named-argument calls
using the documented names to fail. Update the signatures and
corresponding descriptions to use the SQL-visible names, without
affecting existing calls.
Backpatch to all supported versions, except for the changes to
pg_logical_emit_message and pg_input_error_info, which are
backpatched through v17 and v16, respectively.
Reported-by: Mi cro <micro6947@gmail.com>
Author: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/19D9D4CB-8C31-493E-982A-1E17042D68C5%40gmail.com
Backpatch-through: 14
---
doc/src/sgml/func.sgml | 70 ++++++++++++++++++------------------
doc/src/sgml/textsearch.sgml | 10 +++---
2 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index bf030ff7bd0..26547149087 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -3262,13 +3262,13 @@ SELECT NOT(ROW(table.*) IS NOT NULL) FROM TABLE; -- detect at least one null in
<indexterm>
<primary>parse_ident</primary>
</indexterm>
- <function>parse_ident</function> ( <parameter>qualified_identifier</parameter> <type>text</type>
- <optional>, <parameter>strict_mode</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> </optional> )
+ <function>parse_ident</function> ( <parameter>str</parameter> <type>text</type>
+ <optional>, <parameter>strict</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> </optional> )
<returnvalue>text[]</returnvalue>
</para>
<para>
- Splits <parameter>qualified_identifier</parameter> into an array of
- identifiers, removing any quoting of individual identifiers. By
+ Splits the qualified identifier <parameter>str</parameter> into an
+ array of identifiers, removing any quoting of individual identifiers. By
default, extra characters after the last identifier are considered an
error; but if the second parameter is <literal>false</literal>, then such
extra characters are ignored. (This behavior is useful for parsing
@@ -10025,7 +10025,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamp</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type> )
@@ -10048,7 +10048,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
</indexterm>
<function>make_timestamptz</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type>
@@ -14283,13 +14283,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<primary>ts_parse</primary>
</indexterm>
<function>ts_parse</function> ( <parameter>parser_name</parameter> <type>text</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using the
+ Extracts tokens from the document <parameter>txt</parameter> using the
named parser.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -14302,13 +14302,13 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>ts_parse</function> ( <parameter>parser_oid</parameter> <type>oid</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using a
+ Extracts tokens from the document <parameter>txt</parameter> using a
parser specified by OID.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -14364,7 +14364,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<indexterm>
<primary>ts_stat</primary>
</indexterm>
- <function>ts_stat</function> ( <parameter>sqlquery</parameter> <type>text</type>
+ <function>ts_stat</function> ( <parameter>query</parameter> <type>text</type>
<optional>, <parameter>weights</parameter> <type>text</type> </optional> )
<returnvalue>setof record</returnvalue>
( <parameter>word</parameter> <type>text</type>,
@@ -14372,7 +14372,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<parameter>nentry</parameter> <type>integer</type> )
</para>
<para>
- Executes the <parameter>sqlquery</parameter>, which must return a
+ Executes the <parameter>query</parameter>, which must return a
single <type>tsvector</type> column, and returns statistics about each
distinct lexeme contained in the data.
See <xref linkend="textsearch-statistics"/> for details.
@@ -15599,7 +15599,7 @@ SELECT xmltable.*
The following functions map the contents of relational tables to
XML values. They can be thought of as XML export functionality:
<synopsis>
-<function>table_to_xml</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15610,7 +15610,7 @@ SELECT xmltable.*
<para>
<function>table_to_xml</function> maps the content of the named
- table, passed as parameter <parameter>table</parameter>. The
+ table, passed as parameter <parameter>tbl</parameter>. The
<type>regclass</type> type accepts strings identifying tables using the
usual notation, including optional schema qualification and
double quotes (see <xref linkend="datatype-oid"/> for details).
@@ -15701,7 +15701,7 @@ SELECT xmltable.*
The following functions return XML Schema documents describing the
mappings performed by the corresponding functions above:
<synopsis>
-<function>table_to_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -15718,7 +15718,7 @@ SELECT xmltable.*
together. They can be useful where self-contained and
self-describing results are wanted:
<synopsis>
-<function>table_to_xml_and_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml_and_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml_and_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -17329,19 +17329,19 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set</primary>
</indexterm>
- <function>jsonb_set</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_set</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
+ Returns <parameter>jsonb_in</parameter>
with the item designated by <parameter>path</parameter>
- replaced by <parameter>new_value</parameter>, or with
- <parameter>new_value</parameter> added if
+ replaced by <parameter>replacement</parameter>, or with
+ <parameter>replacement</parameter> added if
<parameter>create_if_missing</parameter> is true (which is the
default) and the item designated by <parameter>path</parameter>
does not exist.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -17365,11 +17365,11 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set_lax</primary>
</indexterm>
- <function>jsonb_set_lax</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
+ <function>jsonb_set_lax</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- If <parameter>new_value</parameter> is not <literal>NULL</literal>,
+ If <parameter>replacement</parameter> is not <literal>NULL</literal>,
behaves identically to <literal>jsonb_set</literal>. Otherwise behaves
according to the value
of <parameter>null_value_treatment</parameter> which must be one
@@ -17393,22 +17393,22 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_insert</primary>
</indexterm>
- <function>jsonb_insert</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_insert</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
- with <parameter>new_value</parameter> inserted. If the item
+ Returns <parameter>jsonb_in</parameter>
+ with <parameter>replacement</parameter> inserted. If the item
designated by the <parameter>path</parameter> is an array
- element, <parameter>new_value</parameter> will be inserted before
+ element, <parameter>replacement</parameter> will be inserted before
that item if <parameter>insert_after</parameter> is false (which
is the default), or after it
if <parameter>insert_after</parameter> is true. If the item
designated by the <parameter>path</parameter> is an object
- field, <parameter>new_value</parameter> will be inserted only if
+ field, <parameter>replacement</parameter> will be inserted only if
the object does not already contain that key.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -27477,8 +27477,8 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
<primary>pg_input_error_info</primary>
</indexterm>
<function>pg_input_error_info</function> (
- <parameter>string</parameter> <type>text</type>,
- <parameter>type</parameter> <type>text</type>
+ <parameter>value</parameter> <type>text</type>,
+ <parameter>type_name</parameter> <type>text</type>
)
<returnvalue>record</returnvalue>
( <parameter>message</parameter> <type>text</type>,
@@ -27487,7 +27487,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
<parameter>sql_error_code</parameter> <type>text</type> )
</para>
<para>
- Tests whether the given <parameter>string</parameter> is valid
+ Tests whether the given <parameter>value</parameter> is valid
input for the specified data type; if not, return the details of
the error that would have been thrown. If the input is valid, the
results are NULL. The inputs are the same as
@@ -29985,11 +29985,11 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
<indexterm>
<primary>pg_logical_emit_message</primary>
</indexterm>
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>text</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>text</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
<returnvalue>pg_lsn</returnvalue>
</para>
<para role="func_signature">
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>bytea</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>bytea</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
<returnvalue>pg_lsn</returnvalue>
</para>
<para>
@@ -30001,7 +30001,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
reads the record. The <parameter>prefix</parameter> parameter is a
textual prefix that can be used by logical decoding plugins to easily
recognize messages that are interesting for them.
- The <parameter>content</parameter> parameter is the content of the
+ The <parameter>message</parameter> parameter is the content of the
message, given either in text or binary form.
The <parameter>flush</parameter> parameter (default set to
<literal>false</literal>) controls if the message is immediately
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index d3695fc9feb..a8f53aa38e4 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2010,13 +2010,13 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
</para>
<synopsis>
-ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
+ts_stat(<replaceable class="parameter">query</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>,
OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type>
</synopsis>
<para>
- <replaceable>sqlquery</replaceable> is a text value containing an SQL
+ <replaceable>query</replaceable> is a text value containing an SQL
query which must return a single <type>tsvector</type> column.
<function>ts_stat</function> executes the query and returns statistics about
each distinct lexeme (word) contained in the <type>tsvector</type>
@@ -3499,14 +3499,14 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
</indexterm>
<synopsis>
-ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
-ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
</synopsis>
<para>
- <function>ts_parse</function> parses the given <replaceable>document</replaceable>
+ <function>ts_parse</function> parses the document <replaceable>txt</replaceable>
and returns a series of records, one for each token produced by
parsing. Each record includes a <varname>tokid</varname> showing the
assigned token type and a <varname>token</varname> which is the text of the
--
2.56.0
v1-0001-doc-Match-built-in-function-parameter-names-to-th.patch (application/octet-stream, 21.6K) download
From 875d00e88d23389e49c6f8552f84052da1a679d9 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Mon, 2 Nov 2026 00:56:18 +0900
Subject: [PATCH v1] doc: Match built-in function parameter names to their SQL
names
Several documented function signatures used parameter names that
differed from the registered SQL names, causing named-argument calls
using the documented names to fail. Update the signatures and
corresponding descriptions to use the SQL-visible names, without
affecting existing calls.
Backpatch to all supported versions, except for the changes to
pg_logical_emit_message and pg_input_error_info, which are
backpatched through v17 and v16, respectively.
Reported-by: Mi cro <micro6947@gmail.com>
Author: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/19D9D4CB-8C31-493E-982A-1E17042D68C5%40gmail.com
Backpatch-through: 14
---
doc/src/sgml/func/func-admin.sgml | 6 +++---
doc/src/sgml/func/func-datetime.sgml | 4 ++--
doc/src/sgml/func/func-info.sgml | 6 +++---
doc/src/sgml/func/func-json.sgml | 26 +++++++++++++-------------
doc/src/sgml/func/func-string.sgml | 8 ++++----
doc/src/sgml/func/func-textsearch.sgml | 12 ++++++------
doc/src/sgml/func/func-xml.sgml | 8 ++++----
doc/src/sgml/textsearch.sgml | 10 +++++-----
8 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/doc/src/sgml/func/func-admin.sgml b/doc/src/sgml/func/func-admin.sgml
index 64b0e7bb972..ed872264f02 100644
--- a/doc/src/sgml/func/func-admin.sgml
+++ b/doc/src/sgml/func/func-admin.sgml
@@ -1457,11 +1457,11 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
<indexterm>
<primary>pg_logical_emit_message</primary>
</indexterm>
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>text</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>text</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
<returnvalue>pg_lsn</returnvalue>
</para>
<para role="func_signature">
- <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>content</parameter> <type>bytea</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
+ <function>pg_logical_emit_message</function> ( <parameter>transactional</parameter> <type>boolean</type>, <parameter>prefix</parameter> <type>text</type>, <parameter>message</parameter> <type>bytea</type> <optional>, <parameter>flush</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>false</literal></optional> )
<returnvalue>pg_lsn</returnvalue>
</para>
<para>
@@ -1473,7 +1473,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
reads the record. The <parameter>prefix</parameter> parameter is a
textual prefix that can be used by logical decoding plugins to easily
recognize messages that are interesting for them.
- The <parameter>content</parameter> parameter is the content of the
+ The <parameter>message</parameter> parameter is the content of the
message, given either in text or binary form.
The <parameter>flush</parameter> parameter (default set to
<literal>false</literal>) controls if the message is immediately
diff --git a/doc/src/sgml/func/func-datetime.sgml b/doc/src/sgml/func/func-datetime.sgml
index 39dddde4fe1..63fb9c53c0d 100644
--- a/doc/src/sgml/func/func-datetime.sgml
+++ b/doc/src/sgml/func/func-datetime.sgml
@@ -863,7 +863,7 @@
</indexterm>
<function>make_timestamp</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type> )
@@ -886,7 +886,7 @@
</indexterm>
<function>make_timestamptz</function> ( <parameter>year</parameter> <type>int</type>,
<parameter>month</parameter> <type>int</type>,
- <parameter>day</parameter> <type>int</type>,
+ <parameter>mday</parameter> <type>int</type>,
<parameter>hour</parameter> <type>int</type>,
<parameter>min</parameter> <type>int</type>,
<parameter>sec</parameter> <type>double precision</type>
diff --git a/doc/src/sgml/func/func-info.sgml b/doc/src/sgml/func/func-info.sgml
index c9c0261b52f..b6c080715ba 100644
--- a/doc/src/sgml/func/func-info.sgml
+++ b/doc/src/sgml/func/func-info.sgml
@@ -2729,8 +2729,8 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
<primary>pg_input_error_info</primary>
</indexterm>
<function>pg_input_error_info</function> (
- <parameter>string</parameter> <type>text</type>,
- <parameter>type</parameter> <type>text</type>
+ <parameter>value</parameter> <type>text</type>,
+ <parameter>type_name</parameter> <type>text</type>
)
<returnvalue>record</returnvalue>
( <parameter>message</parameter> <type>text</type>,
@@ -2739,7 +2739,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
<parameter>sql_error_code</parameter> <type>text</type> )
</para>
<para>
- Tests whether the given <parameter>string</parameter> is valid
+ Tests whether the given <parameter>value</parameter> is valid
input for the specified data type; if not, return the details of
the error that would have been thrown. If the input is valid, the
results are NULL. The inputs are the same as
diff --git a/doc/src/sgml/func/func-json.sgml b/doc/src/sgml/func/func-json.sgml
index 0763ec81ed8..ede39e7d024 100644
--- a/doc/src/sgml/func/func-json.sgml
+++ b/doc/src/sgml/func/func-json.sgml
@@ -1470,19 +1470,19 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set</primary>
</indexterm>
- <function>jsonb_set</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_set</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
+ Returns <parameter>jsonb_in</parameter>
with the item designated by <parameter>path</parameter>
- replaced by <parameter>new_value</parameter>, or with
- <parameter>new_value</parameter> added if
+ replaced by <parameter>replacement</parameter>, or with
+ <parameter>replacement</parameter> added if
<parameter>create_if_missing</parameter> is true (which is the
default) and the item designated by <parameter>path</parameter>
does not exist.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
@@ -1506,11 +1506,11 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_set_lax</primary>
</indexterm>
- <function>jsonb_set_lax</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
+ <function>jsonb_set_lax</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>create_if_missing</parameter> <type>boolean</type> <optional>, <parameter>null_value_treatment</parameter> <type>text</type> </optional></optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- If <parameter>new_value</parameter> is not <literal>NULL</literal>,
+ If <parameter>replacement</parameter> is not <literal>NULL</literal>,
behaves identically to <literal>jsonb_set</literal>. Otherwise behaves
according to the value
of <parameter>null_value_treatment</parameter> which must be one
@@ -1534,22 +1534,22 @@ ERROR: value too long for type character(2)
<indexterm>
<primary>jsonb_insert</primary>
</indexterm>
- <function>jsonb_insert</function> ( <parameter>target</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>new_value</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
+ <function>jsonb_insert</function> ( <parameter>jsonb_in</parameter> <type>jsonb</type>, <parameter>path</parameter> <type>text[]</type>, <parameter>replacement</parameter> <type>jsonb</type> <optional>, <parameter>insert_after</parameter> <type>boolean</type> </optional> )
<returnvalue>jsonb</returnvalue>
</para>
<para>
- Returns <parameter>target</parameter>
- with <parameter>new_value</parameter> inserted. If the item
+ Returns <parameter>jsonb_in</parameter>
+ with <parameter>replacement</parameter> inserted. If the item
designated by the <parameter>path</parameter> is an array
- element, <parameter>new_value</parameter> will be inserted before
+ element, <parameter>replacement</parameter> will be inserted before
that item if <parameter>insert_after</parameter> is false (which
is the default), or after it
if <parameter>insert_after</parameter> is true. If the item
designated by the <parameter>path</parameter> is an object
- field, <parameter>new_value</parameter> will be inserted only if
+ field, <parameter>replacement</parameter> will be inserted only if
the object does not already contain that key.
All earlier steps in the path must exist, or
- the <parameter>target</parameter> is returned unchanged.
+ the <parameter>jsonb_in</parameter> is returned unchanged.
As with the path oriented operators, negative integers that
appear in the <parameter>path</parameter> count from the end
of JSON arrays.
diff --git a/doc/src/sgml/func/func-string.sgml b/doc/src/sgml/func/func-string.sgml
index 941ebd3cd68..c50fe0bb396 100644
--- a/doc/src/sgml/func/func-string.sgml
+++ b/doc/src/sgml/func/func-string.sgml
@@ -830,13 +830,13 @@
<indexterm>
<primary>parse_ident</primary>
</indexterm>
- <function>parse_ident</function> ( <parameter>qualified_identifier</parameter> <type>text</type>
- <optional>, <parameter>strict_mode</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> </optional> )
+ <function>parse_ident</function> ( <parameter>str</parameter> <type>text</type>
+ <optional>, <parameter>strict</parameter> <type>boolean</type> <literal>DEFAULT</literal> <literal>true</literal> </optional> )
<returnvalue>text[]</returnvalue>
</para>
<para>
- Splits <parameter>qualified_identifier</parameter> into an array of
- identifiers, removing any quoting of individual identifiers. By
+ Splits the qualified identifier <parameter>str</parameter> into an
+ array of identifiers, removing any quoting of individual identifiers. By
default, extra characters after the last identifier are considered an
error; but if the second parameter is <literal>false</literal>, then such
extra characters are ignored. (This behavior is useful for parsing
diff --git a/doc/src/sgml/func/func-textsearch.sgml b/doc/src/sgml/func/func-textsearch.sgml
index 290ad81d697..4d2d9ec9110 100644
--- a/doc/src/sgml/func/func-textsearch.sgml
+++ b/doc/src/sgml/func/func-textsearch.sgml
@@ -940,13 +940,13 @@
<primary>ts_parse</primary>
</indexterm>
<function>ts_parse</function> ( <parameter>parser_name</parameter> <type>text</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using the
+ Extracts tokens from the document <parameter>txt</parameter> using the
named parser.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -959,13 +959,13 @@
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>ts_parse</function> ( <parameter>parser_oid</parameter> <type>oid</type>,
- <parameter>document</parameter> <type>text</type> )
+ <parameter>txt</parameter> <type>text</type> )
<returnvalue>setof record</returnvalue>
( <parameter>tokid</parameter> <type>integer</type>,
<parameter>token</parameter> <type>text</type> )
</para>
<para>
- Extracts tokens from the <parameter>document</parameter> using a
+ Extracts tokens from the document <parameter>txt</parameter> using a
parser specified by OID.
See <xref linkend="textsearch-parser-testing"/> for details.
</para>
@@ -1021,7 +1021,7 @@
<indexterm>
<primary>ts_stat</primary>
</indexterm>
- <function>ts_stat</function> ( <parameter>sqlquery</parameter> <type>text</type>
+ <function>ts_stat</function> ( <parameter>query</parameter> <type>text</type>
<optional>, <parameter>weights</parameter> <type>text</type> </optional> )
<returnvalue>setof record</returnvalue>
( <parameter>word</parameter> <type>text</type>,
@@ -1029,7 +1029,7 @@
<parameter>nentry</parameter> <type>integer</type> )
</para>
<para>
- Executes the <parameter>sqlquery</parameter>, which must return a
+ Executes the <parameter>query</parameter>, which must return a
single <type>tsvector</type> column, and returns statistics about each
distinct lexeme contained in the data.
See <xref linkend="textsearch-statistics"/> for details.
diff --git a/doc/src/sgml/func/func-xml.sgml b/doc/src/sgml/func/func-xml.sgml
index 511bc90852a..3b42a3100f9 100644
--- a/doc/src/sgml/func/func-xml.sgml
+++ b/doc/src/sgml/func/func-xml.sgml
@@ -1023,7 +1023,7 @@ SELECT xmltable.*
The following functions map the contents of relational tables to
XML values. They can be thought of as XML export functionality:
<synopsis>
-<function>table_to_xml</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -1034,7 +1034,7 @@ SELECT xmltable.*
<para>
<function>table_to_xml</function> maps the content of the named
- table, passed as parameter <parameter>table</parameter>. The
+ table, passed as parameter <parameter>tbl</parameter>. The
<type>regclass</type> type accepts strings identifying tables using the
usual notation, including optional schema qualification and
double quotes (see <xref linkend="datatype-oid"/> for details).
@@ -1125,7 +1125,7 @@ SELECT xmltable.*
The following functions return XML Schema documents describing the
mappings performed by the corresponding functions above:
<synopsis>
-<function>table_to_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
@@ -1142,7 +1142,7 @@ SELECT xmltable.*
together. They can be useful where self-contained and
self-describing results are wanted:
<synopsis>
-<function>table_to_xml_and_xmlschema</function> ( <parameter>table</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
+<function>table_to_xml_and_xmlschema</function> ( <parameter>tbl</parameter> <type>regclass</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
<function>query_to_xml_and_xmlschema</function> ( <parameter>query</parameter> <type>text</type>, <parameter>nulls</parameter> <type>boolean</type>,
<parameter>tableforest</parameter> <type>boolean</type>, <parameter>targetns</parameter> <type>text</type> ) <returnvalue>xml</returnvalue>
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 2f3a76bef1e..e78346fa64a 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2010,13 +2010,13 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
</para>
<synopsis>
-ts_stat(<replaceable class="parameter">sqlquery</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
+ts_stat(<replaceable class="parameter">query</replaceable> <type>text</type>, <optional> <replaceable class="parameter">weights</replaceable> <type>text</type>, </optional>
OUT <replaceable class="parameter">word</replaceable> <type>text</type>, OUT <replaceable class="parameter">ndoc</replaceable> <type>integer</type>,
OUT <replaceable class="parameter">nentry</replaceable> <type>integer</type>) returns <type>setof record</type>
</synopsis>
<para>
- <replaceable>sqlquery</replaceable> is a text value containing an SQL
+ <replaceable>query</replaceable> is a text value containing an SQL
query which must return a single <type>tsvector</type> column.
<function>ts_stat</function> executes the query and returns statistics about
each distinct lexeme (word) contained in the <type>tsvector</type>
@@ -3549,14 +3549,14 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
</indexterm>
<synopsis>
-ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_name</replaceable> <type>text</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
-ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">document</replaceable> <type>text</type>,
+ts_parse(<replaceable class="parameter">parser_oid</replaceable> <type>oid</type>, <replaceable class="parameter">txt</replaceable> <type>text</type>,
OUT <replaceable class="parameter">tokid</replaceable> <type>integer</type>, OUT <replaceable class="parameter">token</replaceable> <type>text</type>) returns <type>setof record</type>
</synopsis>
<para>
- <function>ts_parse</function> parses the given <replaceable>document</replaceable>
+ <function>ts_parse</function> parses the document <replaceable>txt</replaceable>
and returns a series of records, one for each token produced by
parsing. Each record includes a <varname>tokid</varname> showing the
assigned token type and a <varname>token</varname> which is the text of the
--
2.56.0
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Documented parameter names differ from callable proargnames for several built-ins
@ 2026-11-03 03:46 Matemática A3K <matematica.a3k@gmail.com>
parent: Fujii Masao <masao.fujii@gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Matemática A3K @ 2026-11-03 03:46 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: Mi cro <micro6947@gmail.com>; pgsql-docs
I came across named parameters in an example of the pattern matching
chapter. I thought it was just an example but it turns out that it is
supported.
To inspect if each function parameter is documented correctly for each
function of each supported release seems like a gargantuan task to be
done.
Perhaps a note in somewhere that says "named parameters in functions
are supported but may not be up to date, using positional arguments is
the recommended way for function calling"?
On Sun, Nov 1, 2026 at 2:51 PM Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Sat, Oct 31, 2026 at 6:50 PM Mi cro <micro6947@gmail.com> wrote:
> > I suggest updating the displayed names to the SQL-visible parameter names.
> > Renaming the runtime parameters would change named-call compatibility.
>
> Thanks for the report and suggestion!
>
> I also found the same issue in pg_input_error_info(), ts_parse(), and ts_stat().
> The attached patch fixes the reported issue and updates these three functions
> as well.
>
> Regards,
>
> --
> Fujii Masao
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Documented parameter names differ from callable proargnames for several built-ins
@ 2026-11-03 04:15 David G. Johnston <david.g.johnston@gmail.com>
parent: Matemática A3K <matematica.a3k@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: David G. Johnston @ 2026-11-03 04:15 UTC (permalink / raw)
To: Matemática A3K <matematica.a3k@gmail.com>; +Cc: Fujii Masao <masao.fujii@gmail.com>; Mi cro <micro6947@gmail.com>; pgsql-docs
On Mon, Nov 2, 2026 at 8:47 PM Matemática A3K <matematica.a3k@gmail.com>
wrote:
> To inspect if each function parameter is documented correctly for each
> function of each supported release seems like a gargantuan task to be
> done.
>
We're pretty good about sgml markup in this area, it doesn't seem that hard
to build a deterministic detection system if someone wants to try. I'd
make it require an installed instance and use the catalog as the
authoritative dataset.
> Perhaps a note in somewhere that says "named parameters in functions
> are supported but may not be up to date, using positional arguments is
> the recommended way for function calling"?
>
>
I don't think we actually recommend that. Telling people how to find the
names of function parameters should they wish to use them and the docs
aren't correct would be helpful though. For procedure-like
functions/procedures I'd say named arguments are recommended.
David J.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Documented parameter names differ from callable proargnames for several built-ins
@ 2026-11-03 04:46 Matemática A3K <matematica.a3k@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Matemática A3K @ 2026-11-03 04:46 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Fujii Masao <masao.fujii@gmail.com>; Mi cro <micro6947@gmail.com>; pgsql-docs
On Tue, Nov 3, 2026 at 1:16 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Mon, Nov 2, 2026 at 8:47 PM Matemática A3K <matematica.a3k@gmail.com> wrote:
>>
>> To inspect if each function parameter is documented correctly for each
>> function of each supported release seems like a gargantuan task to be
>> done.
>
>
> We're pretty good about sgml markup in this area, it doesn't seem that hard to build a deterministic detection system if someone wants to try. I'd make it require an installed instance and use the catalog as the authoritative dataset.
I can'f figure that code in my mind, only manual checking, it would be
nice to see the code that automates it.
>
>>
>> Perhaps a note in somewhere that says "named parameters in functions
>> are supported but may not be up to date, using positional arguments is
>> the recommended way for function calling"?
>>
>
> I don't think we actually recommend that. Telling people how to find the names of function parameters should they wish to use them and the docs aren't correct would be helpful though. For procedure-like functions/procedures I'd say named arguments are recommended.
The feature works (calling a function with named arguments), it can't
be used if the names documented doesn't match those defined in the
code or the catalog. Stating this as caveat isn't neccesary if the
correspondence is ensured. The patches attached go in this sense, so
they should be accepted. If someone can provide the code you
mentioned, then there wouldn't be anything more to be fixed here
(besides the mismatches that code may find).
>
> David J.
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Documented parameter names differ from callable proargnames for several built-ins
@ 2026-11-03 06:20 Fujii Masao <masao.fujii@gmail.com>
parent: Fujii Masao <masao.fujii@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Fujii Masao @ 2026-11-03 06:20 UTC (permalink / raw)
To: Mi cro <micro6947@gmail.com>; +Cc: pgsql-docs
On Mon, Nov 2, 2026 at 2:50 AM Fujii Masao <masao.fujii@gmail.com> wrote:
> I also found the same issue in pg_input_error_info(), ts_parse(), and ts_stat().
> The attached patch fixes the reported issue and updates these three functions
> as well.
I've pushed the patch. Thanks!
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-11-03 06:20 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 06:39 Documented parameter names differ from callable proargnames for several built-ins Mi cro <micro6947@gmail.com>
2026-11-01 17:50 ` Fujii Masao <masao.fujii@gmail.com>
2026-11-03 03:46 ` Matemática A3K <matematica.a3k@gmail.com>
2026-11-03 04:15 ` David G. Johnston <david.g.johnston@gmail.com>
2026-11-03 04:46 ` Matemática A3K <matematica.a3k@gmail.com>
2026-11-03 06:20 ` Fujii Masao <masao.fujii@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox