From aa39b0ad4fe87c33ae889bbcfa9a81e973605fd8 Mon Sep 17 00:00:00 2001
From: "okbob@github.com" <pavel.stehule@gmail.com>
Date: Thu, 27 Feb 2025 16:35:52 +0100
Subject: [PATCH 2/2] Separate old (proprietary) syntax to own para with note
 so it is supported just for compatibility reasons.

---
 doc/src/sgml/plpgsql.sgml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 60af57712b7..2acdf43b4a1 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3317,7 +3317,7 @@ OPEN curs1 FOR EXECUTE format('SELECT * FROM %I WHERE col1 = $1',tabname) USING
      <title>Opening a Bound Cursor</title>
 
 <synopsis>
-OPEN <replaceable>bound_cursorvar</replaceable> <optional> ( <optional> <replaceable>argument_name</replaceable> { := | => } </optional> <replaceable>argument_value</replaceable> <optional>, ...</optional> ) </optional>;
+OPEN <replaceable>bound_cursorvar</replaceable> <optional> ( <optional> <replaceable>argument_name</replaceable> { => | := } </optional> <replaceable>argument_value</replaceable> <optional>, ...</optional> ) </optional>;
 </synopsis>
 
          <para>
@@ -3340,7 +3340,7 @@ OPEN <replaceable>bound_cursorvar</replaceable> <optional> ( <optional> <replace
           Argument values can be passed using either <firstterm>positional</firstterm>
           or <firstterm>named</firstterm> notation.  In positional
           notation, all arguments are specified in order.  In named notation,
-          each argument's name is specified using <literal>:=</literal> to
+          each argument's name is specified using <literal>=></literal> to
           separate it from the argument expression. Similar to calling
           functions, described in <xref linkend="sql-syntax-calling-funcs"/>, it
           is also allowed to mix positional and named notation.
@@ -3351,11 +3351,18 @@ OPEN <replaceable>bound_cursorvar</replaceable> <optional> ( <optional> <replace
 <programlisting>
 OPEN curs2;
 OPEN curs3(42);
-OPEN curs3(key := 42);
 OPEN curs3(Key => 42);
 </programlisting>
          </para>
 
+         <para>
+          An older syntax based on <literal>:=</literal> is supported for backward
+          compatibility:
+<programlisting>
+OPEN curs3(key := 42);
+</programlisting>
+         </para>
+
          <para>
           Because variable substitution is done on a bound cursor's query,
           there are really two ways to pass values into the cursor: either
-- 
2.48.1

