postgres.git / summary / log / commit / refs
commit 862a20118cfaf85ccb159559f0cf4934b1a93fa2
Author: Fujii Masao <fujii@postgresql.org>
Date: Tue Nov 03 06:03:06 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.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
[parent: 3b859f171514]