]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Normalize postgresql docs links to point to current
authorFederico Caselli <cfederico87@gmail.com>
Fri, 17 Jun 2022 19:53:32 +0000 (21:53 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 18 Jun 2022 18:02:29 +0000 (14:02 -0400)
Change-Id: Ib7d3ea7ff3356ff8a2f935892d904a69dbc25c3e
(cherry picked from commit 3bde1eae31212b5bc2c6652dca52f70fb79d5950)

doc/build/changelog/migration_07.rst
doc/build/orm/versioning.rst
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/ext.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/postgresql/ranges.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/sqltypes.py
test/dialect/postgresql/test_reflection.py

index 12a3c23e6d0b8fb94ef466322fa4e23e28003bfe..a222f5380bd64cb0665eb23107ae0a2c12c8ddee 100644 (file)
@@ -373,8 +373,7 @@ The best introduction to window functions is on PostgreSQL's
 site, where window functions have been supported since
 version 8.4:
 
-https://www.postgresql.org/docs/9.0/static/tutorial-
-window.html
+https://www.postgresql.org/docs/current/static/tutorial-window.html
 
 SQLAlchemy provides a simple construct typically invoked via
 an existing function clause, using the ``over()`` method,
index a141df6a0cdd74ef691fde02952e02cc9c463d76..30388eb8d24bfa27547fff2512dc02b803cb403f 100644 (file)
@@ -45,7 +45,7 @@ transaction).
 
     .. seealso::
 
-        `Repeatable Read Isolation Level <https://www.postgresql.org/docs/9.1/static/transaction-iso.html#XACT-REPEATABLE-READ>`_ - PostgreSQL's implementation of repeatable read, including a description of the error condition.
+        `Repeatable Read Isolation Level <https://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-REPEATABLE-READ>`_ - PostgreSQL's implementation of repeatable read, including a description of the error condition.
 
 Simple Version Counting
 -----------------------
@@ -141,7 +141,7 @@ some means of generating new identifiers when a row is subject to an INSERT
 as well as with an UPDATE.   For the UPDATE case, typically an update trigger
 is needed, unless the database in question supports some other native
 version identifier.  The PostgreSQL database in particular supports a system
-column called `xmin <https://www.postgresql.org/docs/9.1/static/ddl-system-columns.html>`_
+column called `xmin <https://www.postgresql.org/docs/current/static/ddl-system-columns.html>`_
 which provides UPDATE versioning.  We can make use
 of the PostgreSQL ``xmin`` column to version our ``User``
 class as follows::
index 92d9e263e87e92724b42e799637d9f9c3c787f8d..db88d9e6a898b4c2f54407f113de180dc9850d7d 100644 (file)
@@ -409,7 +409,7 @@ which is in the ``public`` (i.e. default) schema will always have the
     from a backend-agnostic perspective
 
     `The Schema Search Path
-    <https://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_
+    <https://www.postgresql.org/docs/current/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_
     - on the PostgreSQL website.
 
 INSERT/UPDATE...RETURNING
@@ -735,7 +735,7 @@ produces a statement equivalent to::
     It's important to remember that text searching in PostgreSQL is powerful but complicated,
     and SQLAlchemy users are advised to reference the PostgreSQL documentation
     regarding
-    `Full Text Search <https://www.postgresql.org/docs/13/textsearch-controls.html>`_.
+    `Full Text Search <https://www.postgresql.org/docs/current/textsearch-controls.html>`_.
 
     There are important differences between ``to_tsquery`` and
     ``plainto_tsquery``, the most significant of which is that ``to_tsquery``
@@ -789,6 +789,11 @@ It is recommended that you use the ``EXPLAIN ANALYZE...`` tool from
 PostgreSQL to ensure that you are generating queries with SQLAlchemy that
 take full advantage of any indexes you may have created for full text search.
 
+.. seealso::
+
+    `Full Text Search <https://www.postgresql.org/docs/current/textsearch-controls.html>`_ - in the PostgreSQL documentation
+
+
 FROM ONLY ...
 -------------
 
@@ -849,7 +854,7 @@ Operator Classes
 
 PostgreSQL allows the specification of an *operator class* for each column of
 an index (see
-https://www.postgresql.org/docs/8.3/interactive/indexes-opclass.html).
+https://www.postgresql.org/docs/current/interactive/indexes-opclass.html).
 The :class:`.Index` construct allows these to be specified via the
 ``postgresql_ops`` keyword argument::
 
@@ -891,7 +896,7 @@ Index Types
 
 PostgreSQL provides several index types: B-Tree, Hash, GiST, and GIN, as well
 as the ability for users to create their own (see
-https://www.postgresql.org/docs/8.3/static/indexes-types.html). These can be
+https://www.postgresql.org/docs/current/static/indexes-types.html). These can be
 specified on :class:`.Index` using the ``postgresql_using`` keyword argument::
 
     Index('my_index', my_table.c.data, postgresql_using='gin')
index c3bda33b92a24df7b0ebc28b16146be93eb64d75..9e52ee1ee9f241a18edd83afbe9980551a1e3d1c 100644 (file)
@@ -93,7 +93,7 @@ class ExcludeConstraint(ColumnCollectionConstraint):
     Defines an EXCLUDE constraint as described in the `PostgreSQL
     documentation`__.
 
-    __ https://www.postgresql.org/docs/9.0/static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE
+    __ https://www.postgresql.org/docs/current/static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE
 
     """  # noqa
 
index 663a17b2aae35b93882604cc5712318c8741f982..bacd60bbeff6b972f3f0074aed10d38255ec4d43 100644 (file)
@@ -110,7 +110,7 @@ using ``host`` as an additional keyword argument::
 .. seealso::
 
     `PQconnectdbParams \
-    <https://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS>`_
+    <https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS>`_
 
 .. _psycopg2_multi_host:
 
@@ -135,7 +135,7 @@ or all connections are unsuccessful in which case an error is raised.
 .. seealso::
 
     `PQConnString \
-    <https://www.postgresql.org/docs/10/libpq-connect.html#LIBPQ-CONNSTRING>`_
+    <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING>`_
 
 Empty DSN Connections / Environment Variable Connections
 ---------------------------------------------------------
index 35cf360cff0a4151652a380762f8b13f170dfbb8..51f3b0489f83934e834bf97ae8e65c439529a641 100644 (file)
@@ -18,7 +18,7 @@ class RangeOperators(object):
     provided in the ``postgres`` dialect and can likely be used for
     any range types you create yourself.
 
-    __ https://www.postgresql.org/docs/devel/static/functions-range.html
+    __ https://www.postgresql.org/docs/current/static/functions-range.html
 
     No extra support is provided for the Range Functions listed in the Range
     Functions table of the PostgreSQL documentation. For these, the normal
index ba5e448acd338a373f7d09389c884b16daf7b212..0ab3912065896b72b9c5c4303c5ea1f54443d5cd 100644 (file)
@@ -511,7 +511,7 @@ class Query(
 
         Here is the `PostgreSQL WITH
         RECURSIVE example
-        <https://www.postgresql.org/docs/8.4/static/queries-with.html>`_.
+        <https://www.postgresql.org/docs/current/static/queries-with.html>`_.
         Note that, in this example, the ``included_parts`` cte and the
         ``incl_alias`` alias of it are Core selectables, which
         means the columns are accessed via the ``.c.`` attribute.  The
index bc7e65d90c83da38dffcd2cec44119c46671415b..b36ae6e8a5d4f83b77bd9377ac6ea7f9d21a7091 100644 (file)
@@ -3749,8 +3749,8 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
                 )
             else:
                 # e.g. FOREIGN KEY (a) REFERENCES r (b, c)
-                # paraphrasing https://www.postgresql.org/docs/9.2/static/\
-                # ddl-constraints.html
+                # paraphrasing
+                # https://www.postgresql.org/docs/current/static/ddl-constraints.html
                 raise exc.ArgumentError(
                     "ForeignKeyConstraint number "
                     "of constrained columns must match the number of "
index 306ac397df3c148893d90ddcb40fea237b2a50cd..edb9c676d29fd1aa372dd3662a4526946d50015b 100644 (file)
@@ -862,8 +862,8 @@ class DateTime(_LookupExpressionAdapter, TypeEngine):
     @util.memoized_property
     def _expression_adaptations(self):
 
-        # Based on https://www.postgresql.org/docs/current/\
-        # static/functions-datetime.html.
+        # Based on
+        # https://www.postgresql.org/docs/current/static/functions-datetime.html.
 
         return {
             operators.add: {Interval: self.__class__},
@@ -886,8 +886,8 @@ class Date(_LookupExpressionAdapter, TypeEngine):
 
     @util.memoized_property
     def _expression_adaptations(self):
-        # Based on https://www.postgresql.org/docs/current/\
-        # static/functions-datetime.html.
+        # Based on
+        # https://www.postgresql.org/docs/current/static/functions-datetime.html.
 
         return {
             operators.add: {
@@ -934,8 +934,8 @@ class Time(_LookupExpressionAdapter, TypeEngine):
 
     @util.memoized_property
     def _expression_adaptations(self):
-        # Based on https://www.postgresql.org/docs/current/\
-        # static/functions-datetime.html.
+        # Based on
+        # https://www.postgresql.org/docs/current/static/functions-datetime.html.
 
         return {
             operators.add: {Date: DateTime, Interval: self.__class__},
@@ -2014,8 +2014,8 @@ class Boolean(Emulated, TypeEngine, SchemaType):
 class _AbstractInterval(_LookupExpressionAdapter, TypeEngine):
     @util.memoized_property
     def _expression_adaptations(self):
-        # Based on https://www.postgresql.org/docs/current/\
-        # static/functions-datetime.html.
+        # Based on
+        # https://www.postgresql.org/docs/current/static/functions-datetime.html.
 
         return {
             operators.add: {
index 3502c745b268deb533839cf1c0f1522b9fa08864..bf8cd511116f2fa7705f413b36ee740276f9280a 100644 (file)
@@ -1091,7 +1091,7 @@ class ReflectionTest(
 
         # "ASC NULLS LAST" is implicit default for indexes,
         # and "NULLS FIRST" is implicit default for "DESC".
-        # (https://www.postgresql.org/docs/11/indexes-ordering.html)
+        # (https://www.postgresql.org/docs/current/indexes-ordering.html)
 
         def compile_exprs(exprs):
             return list(map(str, exprs))