From 2e56ad6a319e02f35444bec391cb777498796851 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Wed, 10 Apr 2024 13:53:25 +0200
Subject: [PATCH] Doc: Update ulinks to RFC documents to avoid redirect

The tools.ietf.org site has been decommissioned and replaced by a
number of sites serving various purposes.  Links to RFCs and BCPs
are now 301 redirected to their new respective IETF sites.  Since
this serves no purpose and only adds network overhead, update our
links to the new locations.

Backpatch to all supported versions.

Discussion: https://postgr.es/m/3C1CEA99-FCED-447D-9858-5A579B4C6687@yesql.se
Backpatch-through: v12
---
 doc/src/sgml/acronyms.sgml     |  2 +-
 doc/src/sgml/catalogs.sgml     |  2 +-
 doc/src/sgml/charset.sgml      |  4 ++--
 doc/src/sgml/client-auth.sgml  | 16 ++++++++--------
 doc/src/sgml/datatype.sgml     |  4 ++--
 doc/src/sgml/ecpg.sgml         |  2 +-
 doc/src/sgml/func.sgml         |  2 +-
 doc/src/sgml/json.sgml         |  2 +-
 doc/src/sgml/libpq.sgml        |  6 +++---
 doc/src/sgml/pgcrypto.sgml     |  2 +-
 doc/src/sgml/protocol.sgml     |  6 +++---
 doc/src/sgml/ref/psql-ref.sgml |  2 +-
 doc/src/sgml/textsearch.sgml   |  2 +-
 doc/src/sgml/uuid-ossp.sgml    |  2 +-
 14 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/doc/src/sgml/acronyms.sgml b/doc/src/sgml/acronyms.sgml
index 2df6559accc..159e600d726 100644
--- a/doc/src/sgml/acronyms.sgml
+++ b/doc/src/sgml/acronyms.sgml
@@ -606,7 +606,7 @@
       <ulink
       url="https://en.wikipedia.org/wiki/Server_Name_Indication">
        Server Name Indication</ulink>,
-      <ulink url="https://tools.ietf.org/html/rfc6066#section-3">RFC 6066</ulink>
+      <ulink url="https://datatracker.ietf.org/doc/html/rfc6066#section-3">RFC 6066</ulink>
      </para>
     </listitem>
    </varlistentry>
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 9052981d300..470a8522183 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1614,7 +1614,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 </synopsis>
    where <replaceable>salt</replaceable>, <replaceable>StoredKey</replaceable> and
    <replaceable>ServerKey</replaceable> are in Base64 encoded format. This format is
-   the same as that specified by <ulink url="https://tools.ietf.org/html/rfc5803">RFC 5803</ulink>.
+   the same as that specified by <ulink url="https://datatracker.ietf.org/doc/html/rfc5803">RFC 5803</ulink>.
   </para>
 
   <para>
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 06aea4e53d4..ce89c5aa46b 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -836,7 +836,7 @@ CREATE COLLATION german (provider = libc, locale = 'de_DE');
 
     See <ulink url="https://www.unicode.org/reports/tr35/tr35-collation.html">Unicode
     Technical Standard #35</ulink>
-    and <ulink url="https://tools.ietf.org/html/bcp47">BCP 47</ulink> for
+    and <ulink url="https://www.rfc-editor.org/info/bcp47">BCP 47</ulink> for
     details.  The list of possible collation types (<literal>co</literal>
     subtag) can be found in
     the <ulink url="https://github.com/unicode-org/cldr/blob/master/common/bcp47/collation.xml">CLDR
@@ -2620,7 +2620,7 @@ RESET client_encoding;
       </varlistentry>
 
       <varlistentry>
-       <term><ulink url="https://tools.ietf.org/html/rfc3629">RFC 3629</ulink></term>
+       <term><ulink url="https://datatracker.ietf.org/doc/html/rfc3629">RFC 3629</ulink></term>
 
        <listitem>
         <para>
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 84d041a9ad8..9e22a5b403e 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -627,7 +627,7 @@ hostnogssenc  <replaceable>database</replaceable>  <replaceable>user</replaceabl
        entire <literal>Distinguished Name (DN)</literal> of the certificate.
        This option is probably best used in conjunction with a username map.
        The comparison is done with the <literal>DN</literal> in
-       <ulink url="https://tools.ietf.org/html/rfc2253">RFC 2253</ulink>
+       <ulink url="https://datatracker.ietf.org/doc/html/rfc2253">RFC 2253</ulink>
        format. To see the <literal>DN</literal> of a client certificate
        in this format, do
 <programlisting>
@@ -967,7 +967,7 @@ omicron         bryanh                  guest1
      <para>
       <link linkend="auth-ident">Ident authentication</link>, which
       relies on an <quote>Identification Protocol</quote>
-      (<ulink url="https://tools.ietf.org/html/rfc1413">RFC 1413</ulink>)
+      (<ulink url="https://datatracker.ietf.org/doc/html/rfc1413">RFC 1413</ulink>)
       service on the client's machine.  (On local Unix-socket connections,
       this is treated as peer authentication.)
      </para>
@@ -1106,7 +1106,7 @@ omicron         bryanh                  guest1
       <para>
        The method <literal>scram-sha-256</literal> performs SCRAM-SHA-256
        authentication, as described in
-       <ulink url="https://tools.ietf.org/html/rfc7677">RFC 7677</ulink>.  It
+       <ulink url="https://datatracker.ietf.org/doc/html/rfc7677">RFC 7677</ulink>.  It
        is a challenge-response scheme that prevents password sniffing on
        untrusted connections and supports storing passwords on the server in a
        cryptographically hashed form that is thought to be secure.
@@ -1218,7 +1218,7 @@ omicron         bryanh                  guest1
    <para>
     <productname>GSSAPI</productname> is an industry-standard protocol
     for secure authentication defined in
-    <ulink url="https://tools.ietf.org/html/rfc2743">RFC 2743</ulink>.
+    <ulink url="https://datatracker.ietf.org/doc/html/rfc2743">RFC 2743</ulink>.
     <productname>PostgreSQL</productname>
     supports <productname>GSSAPI</productname> for authentication,
     communications encryption, or both.
@@ -1533,7 +1533,7 @@ omicron         bryanh                  guest1
 
    <para>
     The <quote>Identification Protocol</quote> is described in
-    <ulink url="https://tools.ietf.org/html/rfc1413">RFC 1413</ulink>.
+    <ulink url="https://datatracker.ietf.org/doc/html/rfc1413">RFC 1413</ulink>.
     Virtually every Unix-like
     operating system ships with an ident server that listens on TCP
     port 113 by default. The basic functionality of an ident server
@@ -1702,7 +1702,7 @@ omicron         bryanh                  guest1
        <para>
         Set to 1 to make the connection between PostgreSQL and the LDAP server
         use TLS encryption.  This uses the <literal>StartTLS</literal>
-        operation per <ulink url="https://tools.ietf.org/html/rfc4513">RFC 4513</ulink>.
+        operation per <ulink url="https://datatracker.ietf.org/doc/html/rfc4513">RFC 4513</ulink>.
         See also the <literal>ldapscheme</literal> option for an alternative.
        </para>
       </listitem>
@@ -1797,7 +1797,7 @@ omicron         bryanh                  guest1
        <term><literal>ldapurl</literal></term>
        <listitem>
         <para>
-         An <ulink url="https://tools.ietf.org/html/rfc4516">RFC 4516</ulink>
+         An <ulink url="https://datatracker.ietf.org/doc/html/rfc4516">RFC 4516</ulink>
          LDAP URL.  This is an alternative way to write some of the
          other LDAP options in a more compact and standard form.  The format is
 <synopsis>
@@ -1860,7 +1860,7 @@ ldap[s]://<replaceable>host</replaceable>[:<replaceable>port</replaceable>]/<rep
      <productname>OpenLDAP</productname> as the LDAP client library, the
      <literal>ldapserver</literal> setting may be omitted.  In that case, a
      list of host names and ports is looked up via
-     <ulink url="https://tools.ietf.org/html/rfc2782">RFC 2782</ulink> DNS SRV records.
+     <ulink url="https://datatracker.ietf.org/doc/html/rfc2782">RFC 2782</ulink> DNS SRV records.
      The name <literal>_ldap._tcp.DOMAIN</literal> is looked up, where
      <literal>DOMAIN</literal> is extracted from <literal>ldapbasedn</literal>.
    </para>
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index dbf29cf7600..eea7b166d29 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -2410,7 +2410,7 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
       the date and time.  <productname>PostgreSQL</productname> accepts that format on
       input, but on output it uses a space rather than <literal>T</literal>, as shown
       above.  This is for readability and for consistency with
-      <ulink url="https://tools.ietf.org/html/rfc3339">RFC 3339</ulink> as
+      <ulink url="https://datatracker.ietf.org/doc/html/rfc3339">RFC 3339</ulink> as
       well as some other database systems.
      </para>
     </note>
@@ -4305,7 +4305,7 @@ SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' );
 
    <para>
     The data type <type>uuid</type> stores Universally Unique Identifiers
-    (UUID) as defined by <ulink url="https://tools.ietf.org/html/rfc4122">RFC 4122</ulink>,
+    (UUID) as defined by <ulink url="https://datatracker.ietf.org/doc/html/rfc4122">RFC 4122</ulink>,
     ISO/IEC 9834-8:2005, and related standards.
     (Some systems refer to this data type as a globally unique identifier, or
     GUID,<indexterm><primary>GUID</primary></indexterm> instead.)  This
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 04c91508188..c49b52e70c9 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -3279,7 +3279,7 @@ int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmt
            <literal>%z</literal> - is replaced by the time zone offset from
            UTC; a leading plus sign stands for east of UTC, a minus sign for
            west of UTC, hours and minutes follow with two digits each and no
-           delimiter between them (common form for <ulink url="https://tools.ietf.org/html/rfc822">RFC 822</ulink> date headers).
+           delimiter between them (common form for <ulink url="https://datatracker.ietf.org/doc/html/rfc822">RFC 822</ulink> date headers).
           </para>
          </listitem>
          <listitem>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 373e856020d..58691ee5781 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -4573,7 +4573,7 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
      <listitem>
       <para>
        The <literal>base64</literal> format is that
-       of <ulink url="https://tools.ietf.org/html/rfc2045#section-6.8">RFC
+       of <ulink url="https://datatracker.ietf.org/doc/html/rfc2045#section-6.8">RFC
        2045 Section 6.8</ulink>.  As per the <acronym>RFC</acronym>, encoded lines are
        broken at 76 characters.  However instead of the MIME CRLF
        end-of-line marker, only a newline is used for end-of-line.
diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index c421d4ba75a..5867f27fba1 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -13,7 +13,7 @@
 
  <para>
   JSON data types are for storing JSON (JavaScript Object Notation)
-  data, as specified in <ulink url="https://tools.ietf.org/html/rfc7159">RFC
+  data, as specified in <ulink url="https://datatracker.ietf.org/doc/html/rfc7159">RFC
   7159</ulink>. Such data can also be stored as <type>text</type>, but
   the JSON data types have the advantage of enforcing that each
   stored value is valid according to the JSON rules.  There are also
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 730ba5fda23..567b2072d63 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -873,7 +873,7 @@ PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
     connection parameters.  There are two accepted formats for these strings:
     plain keyword/value strings
     and URIs.  URIs generally follow
-    <ulink url="https://tools.ietf.org/html/rfc3986">RFC
+    <ulink url="https://datatracker.ietf.org/doc/html/rfc3986">RFC
     3986</ulink>, except that multi-host connection strings are allowed
     as further described below.
    </para>
@@ -958,7 +958,7 @@ postgresql:///mydb?host=localhost&amp;port=5433
 
    <para>
     The connection <acronym>URI</acronym> needs to be encoded with <ulink
-    url="https://tools.ietf.org/html/rfc3986#section-2.1">percent-encoding</ulink>
+    url="https://datatracker.ietf.org/doc/html/rfc3986#section-2.1">percent-encoding</ulink>
     if it includes symbols with special meaning in any of its parts.  Here is
     an example where the equal sign (<literal>=</literal>) is replaced with
     <literal>%3D</literal> and the space character with
@@ -8215,7 +8215,7 @@ user=admin
    LDAP query will be performed. The result must be a list of
    <literal>keyword = value</literal> pairs which will be used to set
    connection options.  The URL must conform to
-   <ulink url="https://tools.ietf.org/html/rfc1959">RFC 1959</ulink>
+   <ulink url="https://datatracker.ietf.org/doc/html/rfc1959">RFC 1959</ulink>
    and be of the form
 <synopsis>
 ldap://[<replaceable>hostname</replaceable>[:<replaceable>port</replaceable>]]/<replaceable>search_base</replaceable>?<replaceable>attribute</replaceable>?<replaceable>search_scope</replaceable>?<replaceable>filter</replaceable>
diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml
index ba1f7e28508..6ca7585f1bf 100644
--- a/doc/src/sgml/pgcrypto.sgml
+++ b/doc/src/sgml/pgcrypto.sgml
@@ -438,7 +438,7 @@ gen_salt(type text [, iter_count integer ]) returns text
 
   <para>
    The functions here implement the encryption part of the OpenPGP
-   (<ulink url="https://tools.ietf.org/html/rfc4880">RFC 4880</ulink>)
+   (<ulink url="https://datatracker.ietf.org/doc/html/rfc4880">RFC 4880</ulink>)
    standard.  Supported are both symmetric-key and public-key encryption.
   </para>
 
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index a23a1033632..ee82f818c69 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1585,7 +1585,7 @@ SELCT 1/0;<!-- this typo is intentional -->
     respectively.  The frontend might close the connection at this point
     if it is dissatisfied with the response.  To continue after
     <literal>G</literal>, using the GSSAPI C bindings as discussed in
-    <ulink url="https://tools.ietf.org/html/rfc2744">RFC 2744</ulink>
+    <ulink url="https://datatracker.ietf.org/doc/html/rfc2744">RFC 2744</ulink>
     or equivalent, perform a <acronym>GSSAPI</acronym> initialization by
     calling <function>gss_init_sec_context()</function> in a loop and sending
     the result to the server, starting with an empty input and then with each
@@ -1722,8 +1722,8 @@ ErrorMessage.
    The implemented SASL mechanisms at the moment
    are <literal>SCRAM-SHA-256</literal> and its variant with channel
    binding <literal>SCRAM-SHA-256-PLUS</literal>. They are described in
-   detail in <ulink url="https://tools.ietf.org/html/rfc7677">RFC 7677</ulink>
-   and <ulink url="https://tools.ietf.org/html/rfc5802">RFC 5802</ulink>.
+   detail in <ulink url="https://datatracker.ietf.org/doc/html/rfc7677">RFC 7677</ulink>
+   and <ulink url="https://datatracker.ietf.org/doc/html/rfc5802">RFC 5802</ulink>.
   </para>
 
   <para>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 8f0a6f88360..494340e1285 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2876,7 +2876,7 @@ lo_import 152801
           </indexterm>
           writes column values separated by commas, applying the quoting
           rules described in
-          <ulink url="https://tools.ietf.org/html/rfc4180">RFC 4180</ulink>.
+          <ulink url="https://datatracker.ietf.org/doc/html/rfc4180">RFC 4180</ulink>.
           This output is compatible with the CSV format of the server's
           <command>COPY</command> command.
           A header line with column names is generated unless
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index fb3cc34c303..febcda96634 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2218,7 +2218,7 @@ LIMIT 10;
 
    <para>
     <literal>email</literal> does not support all valid email characters as
-    defined by <ulink url="https://tools.ietf.org/html/rfc5322">RFC 5322</ulink>.
+    defined by <ulink url="https://datatracker.ietf.org/doc/html/rfc5322">RFC 5322</ulink>.
     Specifically, the only non-alphanumeric characters supported for
     email user names are period, dash, and underscore.
    </para>
diff --git a/doc/src/sgml/uuid-ossp.sgml b/doc/src/sgml/uuid-ossp.sgml
index 26bfb908dae..e20a2d6ea9a 100644
--- a/doc/src/sgml/uuid-ossp.sgml
+++ b/doc/src/sgml/uuid-ossp.sgml
@@ -29,7 +29,7 @@
    <xref linkend="uuid-ossp-functions"/> shows the functions available to
    generate UUIDs.
    The relevant standards ITU-T Rec. X.667, ISO/IEC 9834-8:2005, and
-   <ulink url="https://tools.ietf.org/html/rfc4122">RFC 4122</ulink>
+   <ulink url="https://datatracker.ietf.org/doc/html/rfc4122">RFC 4122</ulink>
    specify four algorithms for generating UUIDs, identified by the
    version numbers 1, 3, 4, and 5.  (There is no version 2 algorithm.)
    Each of these algorithms could be suitable for a different set of
-- 
2.39.5