doc: Some copy-editing around prefix operators
authorPeter Eisentraut
Mon, 30 Jun 2025 08:32:26 +0000 (10:32 +0200)
committerPeter Eisentraut
Mon, 30 Jun 2025 08:38:43 +0000 (10:38 +0200)
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 
Discussion: https://www.postgresql.org/message-id/flat/[email protected]

doc/src/sgml/ref/create_operator.sgml
doc/src/sgml/xoper.sgml

index 3553d364541850cd9b525f130258890abc7564e5..d2ffb1b2a500f8a8bb92cb2603412c33e741ef70 100644 (file)
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 CREATE OPERATOR name (
     {FUNCTION|PROCEDURE} = function_name
-    [, LEFTARG = left_type ] [, RIGHTARG = right_type ]
+    [, LEFTARG = left_type ] , RIGHTARG = right_type
     [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ]
     [, RESTRICT = res_proc ] [, JOIN = join_proc ]
     [, HASHES ] [, MERGES ]
@@ -88,8 +88,8 @@ CREATE OPERATOR name (
 
   
    For binary operators, both LEFTARG and
-   RIGHTARG must be defined.  For prefix operators only
-   RIGHTARG should be defined.
+   RIGHTARG must be defined.  For prefix operators, only
+   RIGHTARG must be defined.
    The function_name
    function must have been previously defined using CREATE
    FUNCTION and must be defined to accept the correct number
index 954a90d77d0ed0286a420702c5e9648bd154372a..853b07a9f14896b09607faadd5b002d94f0c2c8a 100644 (file)
@@ -21,7 +21,7 @@
 
   
    PostgreSQL supports prefix
-   and infix operators.  Operators can be
+   and binary (or infix) operators.  Operators can be
    overloaded;overloadingoperators
    that is, the same operator name can be used for different operators
    that have different numbers and types of operands.  When a query is