Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u8Gfp-00HNid-Vm for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Apr 2025 10:52:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u8Gfn-009YZz-CL for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Apr 2025 10:52:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u8Gfn-009YZp-2S for pgsql-hackers@lists.postgresql.org; Fri, 25 Apr 2025 10:52:47 +0000 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u8Gfl-001sMr-0p for pgsql-hackers@lists.postgresql.org; Fri, 25 Apr 2025 10:52:46 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4ZkV6Y5py2z9snn for ; Fri, 25 Apr 2025 12:52:37 +0200 (CEST) Date: Fri, 25 Apr 2025 12:52:30 +0200 From: Christoph Berg To: PostgreSQL Hackers Subject: doc: Some copy-editing around prefix operators Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="JGN1oePIOYXEKfl3" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --JGN1oePIOYXEKfl3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline While reading the CREATE OPERATOR docs around prefix operators, I noticed a few places that could be improved. Christoph --JGN1oePIOYXEKfl3 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-doc-Some-copy-editing-around-prefix-operators.patch" From 478aeea4fe44c9c3462aaf18dbf04a6ed6f74ebc Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 25 Apr 2025 12:46:36 +0200 Subject: [PATCH v1] 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. --- doc/src/sgml/ref/create_operator.sgml | 6 +++--- doc/src/sgml/xoper.sgml | 2 +- 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 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 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 @@ 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 -- 2.47.2 --JGN1oePIOYXEKfl3--