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,
.. 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
-----------------------
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::
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
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``
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 ...
-------------
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::
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')
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
.. 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:
.. 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
---------------------------------------------------------
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
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
)
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 "
@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__},
@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: {
@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__},
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: {
# "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))