]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: add libpq interface for encrypted and non-blocking cancellation
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 23 Mar 2023 12:51:16 +0000 (13:51 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 5 Apr 2024 18:35:16 +0000 (18:35 +0000)
commit9bbf50317bc4ffbed8918b2556c9f091ad4362d5
tree6f30ac3d306ca1f1a37479cdf34ae2204ce152e9
parentbb909baf6463dd9d38a4c11db49fc6cc8e743e0a
feat: add libpq interface for encrypted and non-blocking cancellation

Encrypted and non-blocking cancellation should be part PostgreSQL 17:
- https://commitfest.postgresql.org/37/3511/
- https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=61461a300c1cb5d53955ecd792ad0ce75a104736

We here add the interface for libpq functions for this feature.

An extra test is introduced, it closely reproduces
src/test/modules/libpq_pipeline/libpq_pipeline::test_cancel() in
PostgreSQL test suite.

The error_message property of PGcancelConn is directly an str and
PGcancelConn has no encoding specified and all messages come from the
client (libpq).
14 files changed:
docs/api/pq.rst
docs/news.rst
psycopg/psycopg/errors.py
psycopg/psycopg/pq/__init__.py
psycopg/psycopg/pq/_enums.py
psycopg/psycopg/pq/_pq_ctypes.py
psycopg/psycopg/pq/_pq_ctypes.pyi
psycopg/psycopg/pq/abc.py
psycopg/psycopg/pq/pq_ctypes.py
psycopg_c/psycopg_c/pq.pxd
psycopg_c/psycopg_c/pq/libpq.pxd
psycopg_c/psycopg_c/pq/pgcancel.pyx
psycopg_c/psycopg_c/pq/pgconn.pyx
tests/pq/test_pgconn.py