postgres.git / summary / log / commit / refs
commit ed0c6d55abe82082fffd69bcd21cdd506fdf55e7
Author: Fujii Masao <fujii@postgresql.org>
Date: Tue Nov 03 06:01:02 2026 +0000
First released in: 14.25, 15.20, 16.16, 17.12, 18.7, 19.0
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 7deb28be9b0..0c9c3ced716 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 d5155287df0..33313b5b3bb 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 3d97e2b5375..7515f894abe 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 21a7d0203f9..42641f1d6d7 100644
--- a/doc/src/sgml/func/func-string.sgml
+++ b/doc/src/sgml/func/func-string.sgml
@@ -813,13 +813,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
[parent: 862f16f79731]