summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2025-06-30 08:32:26 +0000
committerPeter Eisentraut2025-06-30 08:38:43 +0000
commit2e640a0fa224e4233220252b360efd33c98b3e90 (patch)
tree95a8d30e6ede93147232a0298d6abc6681cf49f2
parentc5c4fbb4d482b87c2a6c90337f3b657b2d0002ca (diff)
doc: Some copy-editing around prefix operators
When postfix operators where dropped in 1ed6b8956, the CREATE OPERATOR docs were not updated to make the RIGHTARG argument mandatory in the grammar. While at it, make the RIGHTARG docs more concise. Also, the operator docs were mentioning "infix" in the introduction, while using "binary" everywhere else. Author: Christoph Berg <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/[email protected]
-rw-r--r--doc/src/sgml/ref/create_operator.sgml6
-rw-r--r--doc/src/sgml/xoper.sgml2
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml
index 3553d364541..d2ffb1b2a50 100644
--- a/doc/src/sgml/ref/create_operator.sgml
+++ b/doc/src/sgml/ref/create_operator.sgml
@@ -23,7 +23,7 @@ PostgreSQL documentation
<synopsis>
CREATE OPERATOR <replaceable>name</replaceable> (
{FUNCTION|PROCEDURE} = <replaceable class="parameter">function_name</replaceable>
- [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] [, RIGHTARG = <replaceable class="parameter">right_type</replaceable> ]
+ [, LEFTARG = <replaceable class="parameter">left_type</replaceable> ] , RIGHTARG = <replaceable class="parameter">right_type</replaceable>
[, COMMUTATOR = <replaceable class="parameter">com_op</replaceable> ] [, NEGATOR = <replaceable class="parameter">neg_op</replaceable> ]
[, RESTRICT = <replaceable class="parameter">res_proc</replaceable> ] [, JOIN = <replaceable class="parameter">join_proc</replaceable> ]
[, HASHES ] [, MERGES ]
@@ -88,8 +88,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<para>
For binary operators, both <literal>LEFTARG</literal> and
- <literal>RIGHTARG</literal> must be defined. For prefix operators only
- <literal>RIGHTARG</literal> should be defined.
+ <literal>RIGHTARG</literal> must be defined. For prefix operators, only
+ <literal>RIGHTARG</literal> must be defined.
The <replaceable class="parameter">function_name</replaceable>
function must have been previously defined using <command>CREATE
FUNCTION</command> and must be defined to accept the correct number
diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml
index 954a90d77d0..853b07a9f14 100644
--- a/doc/src/sgml/xoper.sgml
+++ b/doc/src/sgml/xoper.sgml
@@ -21,7 +21,7 @@
<para>
<productname>PostgreSQL</productname> supports prefix
- and infix operators. Operators can be
+ and binary (or infix) operators. Operators can be
overloaded;<indexterm><primary>overloading</primary><secondary>operators</secondary></indexterm>
that is, the same operator name can be used for different operators
that have different numbers and types of operands. When a query is