diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-09-14 23:38:00 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-26 10:14:44 -0500 |
| commit | 5eb407f84bdabdbcd68975dbf76dc4c0809d7373 (patch) | |
| tree | 0d37ab4b9c28d8a0fa6cefdcc1933d52ffd9a599 /doc | |
| parent | 8ddb3ef165d0c2d6d7167bb861bb349e68b5e8df (diff) | |
| download | sqlalchemy-5eb407f84bdabdbcd68975dbf76dc4c0809d7373.tar.gz | |
Added support for ``psycopg`` dialect.
Both sync and async versions are supported.
Fixes: #6842
Change-Id: I57751c5028acebfc6f9c43572562405453a2f2a4
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/changelog/migration_20.rst | 25 | ||||
| -rw-r--r-- | doc/build/changelog/unreleased_14/6842.rst | 14 | ||||
| -rw-r--r-- | doc/build/dialects/postgresql.rst | 7 |
3 files changed, 46 insertions, 0 deletions
diff --git a/doc/build/changelog/migration_20.rst b/doc/build/changelog/migration_20.rst index b75cefb31..1c0169888 100644 --- a/doc/build/changelog/migration_20.rst +++ b/doc/build/changelog/migration_20.rst @@ -77,6 +77,31 @@ New Features and Improvements This section covers new features and improvements in SQLAlchemy 2.0 which are not otherwise part of the major 1.4->2.0 migration path. +.. _ticket_6842: + +Dialect support for psycopg 3 (a.k.a. "psycopg") +------------------------------------------------- + +Added dialect support for the `psycopg 3 <https://pypi.org/project/psycopg/>`_ +DBAPI, which despite the number "3" now goes by the package name ``psycopg``, +superseding the previous ``psycopg2`` package that for the time being remains +SQLAlchemy's "default" driver for the ``postgresql`` dialects. ``psycopg`` is a +completely reworked and modernized database adapter for PostgreSQL which +supports concepts such as prepared statements as well as Python asyncio. + +``psycopg`` is the first DBAPI supported by SQLAlchemy which provides +both a pep-249 synchronous API as well as an asyncio driver. The same +``psycopg`` database URL may be used with the :func:`_sa.create_engine` +and :func:`_asyncio.create_async_engine` engine-creation functions, and the +corresponding sync or asyncio version of the dialect will be selected +automatically. + +.. seealso:: + + :ref:`postgresql_psycopg` + + + Behavioral Changes ================== diff --git a/doc/build/changelog/unreleased_14/6842.rst b/doc/build/changelog/unreleased_14/6842.rst new file mode 100644 index 000000000..43b3841ce --- /dev/null +++ b/doc/build/changelog/unreleased_14/6842.rst @@ -0,0 +1,14 @@ +.. change:: + :tags: postgresql, dialect + :tickets: 6842 + + Added support for ``psycopg`` dialect supporting both sync and async + execution. This dialect is available under the ``postgresql+psycopg`` name + for both the :func:`_sa.create_engine` and + :func:`_asyncio.create_async_engine` engine-creation functions. + + .. seealso:: + + :ref:`ticket_6842` + + :ref:`postgresql_psycopg`
\ No newline at end of file diff --git a/doc/build/dialects/postgresql.rst b/doc/build/dialects/postgresql.rst index 958f8e060..d3c9928c7 100644 --- a/doc/build/dialects/postgresql.rst +++ b/doc/build/dialects/postgresql.rst @@ -193,6 +193,13 @@ psycopg2 .. automodule:: sqlalchemy.dialects.postgresql.psycopg2 +.. _postgresql_psycopg: + +psycopg +-------- + +.. automodule:: sqlalchemy.dialects.postgresql.psycopg + pg8000 ------ |
