Remove references to pre-11 versions

Started by Thom Brownover 2 years ago4 messages
#1Thom Brown
thom@linux.com
1 attachment(s)

Hi,

I've attached a patch that removes some now redundant messaging about
unsupported versions.

Regards

Thom

Attachments:

old_version_removal.patchapplication/octet-stream; name=old_version_removal.patchDownload
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 5a47ce4343..8d4403a023 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -5973,17 +5973,6 @@ SELECT regexp_matches('foobarbequebazilbarfbonk', '(b[^b]+)(b[^b]+)', 'g');
      In most cases <function>regexp_matches()</function> should be used with
      the <literal>g</literal> flag, since if you only want the first match, it's
      easier and more efficient to use <function>regexp_match()</function>.
-     However, <function>regexp_match()</function> only exists
-     in <productname>PostgreSQL</productname> version 10 and up.  When working in older
-     versions, a common trick is to place a <function>regexp_matches()</function>
-     call in a sub-select, for example:
-<programlisting>
-SELECT col1, (SELECT regexp_matches(col2, '(bar)(beque)')) FROM tab;
-</programlisting>
-     This produces a text array if there's a match, or <literal>NULL</literal> if
-     not, the same as <function>regexp_match()</function> would do.  Without the
-     sub-select, this query would produce no output at all for table rows
-     without a match, which is typically not the desired behavior.
     </para>
    </tip>
 
diff --git a/doc/src/sgml/ref/create_role.sgml b/doc/src/sgml/ref/create_role.sgml
index 4a84461b28..d07153fd31 100644
--- a/doc/src/sgml/ref/create_role.sgml
+++ b/doc/src/sgml/ref/create_role.sgml
@@ -242,19 +242,10 @@ in sync when changing the above synopsis!
         option.  If no password is specified, the password will be set
         to null and password authentication will always fail for that
         user.  A null password can optionally be written explicitly as
-        <literal>PASSWORD NULL</literal>.
+        <literal>PASSWORD NULL</literal>. Specifying an empty string will
+        also set the password to null.
        </para>
-       <note>
-         <para>
-           Specifying an empty string will also set the password to null,
-           but that was not the case before <productname>PostgreSQL</productname>
-           version 10. In earlier versions, an empty string could be used,
-           or not, depending on the authentication method and the exact
-           version, and libpq would refuse to use it in any case.
-           To avoid the ambiguity, specifying an empty string should be
-           avoided.
-         </para>
-       </note>
+
        <para>
         The password is always stored encrypted in the system catalogs. The
         <literal>ENCRYPTED</literal> keyword has no effect, but is accepted for
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 79d3e657c3..257d22f92f 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -587,9 +587,8 @@ PostgreSQL documentation
         option <option>-C</option> is also used.
        </para>
        <para>
-        If this option is not specified and the server supports temporary
-        replication slots (version 10 and later), then a temporary replication
-        slot is automatically used for WAL streaming.
+        If this option is not specified, then a temporary replication slot is
+        automatically used for WAL streaming.
        </para>
       </listitem>
      </varlistentry>
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thom Brown (#1)
Re: Remove references to pre-11 versions

Thom Brown <thom@linux.com> writes:

I've attached a patch that removes some now redundant messaging about
unsupported versions.

If we want to make that a policy, I think a lot more could be done
--- I remember noticing a documentation comment about some 8.x
version just recently.

However, "out of support" is a lot different from "nobody has any
code written for that version anymore". So I'd be inclined to keep
the first hunk in your patch, the one explaining the regexp_matches-
in-a-subselect trick. People will be trying to puzzle out why
somebody did it like that for years to come.

I agree with simplifying the other two spots.

regards, tom lane

#3Thom Brown
thom@linux.com
In reply to: Tom Lane (#2)
1 attachment(s)
Re: Remove references to pre-11 versions

On Wed, 19 Apr 2023 at 14:58, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Thom Brown <thom@linux.com> writes:

I've attached a patch that removes some now redundant messaging about
unsupported versions.

If we want to make that a policy, I think a lot more could be done
--- I remember noticing a documentation comment about some 8.x
version just recently.

However, "out of support" is a lot different from "nobody has any
code written for that version anymore". So I'd be inclined to keep
the first hunk in your patch, the one explaining the regexp_matches-
in-a-subselect trick. People will be trying to puzzle out why
somebody did it like that for years to come.

I agree with simplifying the other two spots.

Fair enough. I've updated the patch. However, feel free to ignore if
this marks the thin edge of the wedge.

Thom

Attachments:

old_version_removal_v2.patchapplication/octet-stream; name=old_version_removal_v2.patchDownload
diff --git a/doc/src/sgml/ref/create_role.sgml b/doc/src/sgml/ref/create_role.sgml
index 4a84461b28..d07153fd31 100644
--- a/doc/src/sgml/ref/create_role.sgml
+++ b/doc/src/sgml/ref/create_role.sgml
@@ -242,19 +242,10 @@ in sync when changing the above synopsis!
         option.  If no password is specified, the password will be set
         to null and password authentication will always fail for that
         user.  A null password can optionally be written explicitly as
-        <literal>PASSWORD NULL</literal>.
+        <literal>PASSWORD NULL</literal>. Specifying an empty string will
+        also set the password to null.
        </para>
-       <note>
-         <para>
-           Specifying an empty string will also set the password to null,
-           but that was not the case before <productname>PostgreSQL</productname>
-           version 10. In earlier versions, an empty string could be used,
-           or not, depending on the authentication method and the exact
-           version, and libpq would refuse to use it in any case.
-           To avoid the ambiguity, specifying an empty string should be
-           avoided.
-         </para>
-       </note>
+
        <para>
         The password is always stored encrypted in the system catalogs. The
         <literal>ENCRYPTED</literal> keyword has no effect, but is accepted for
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 79d3e657c3..257d22f92f 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -587,9 +587,8 @@ PostgreSQL documentation
         option <option>-C</option> is also used.
        </para>
        <para>
-        If this option is not specified and the server supports temporary
-        replication slots (version 10 and later), then a temporary replication
-        slot is automatically used for WAL streaming.
+        If this option is not specified, then a temporary replication slot is
+        automatically used for WAL streaming.
        </para>
       </listitem>
      </varlistentry>
#4Peter Eisentraut
peter.eisentraut@enterprisedb.com
In reply to: Thom Brown (#1)
Re: Remove references to pre-11 versions

On 19.04.23 14:37, Thom Brown wrote:

I've attached a patch that removes some now redundant messaging about
unsupported versions.

The text in pg_basebackup.sgml describes behavior that still exists in
pg_basebackup. As long as that behavior exists, we should document it
accurately.