This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new b540eb0bfa Add docs about `cursor` extra param in Postgres Connection
(#43134)
b540eb0bfa is described below
commit b540eb0bfa10309d3b57462223ae30331de6ce2c
Author: Kaxil Naik <[email protected]>
AuthorDate: Fri Oct 18 01:18:50 2024 +0100
Add docs about `cursor` extra param in Postgres Connection (#43134)
closes https://github.com/apache/airflow/issues/43120
---
docs/apache-airflow-providers-postgres/connections/postgres.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/apache-airflow-providers-postgres/connections/postgres.rst
b/docs/apache-airflow-providers-postgres/connections/postgres.rst
index 111f0a3f5e..4daec30624 100644
--- a/docs/apache-airflow-providers-postgres/connections/postgres.rst
+++ b/docs/apache-airflow-providers-postgres/connections/postgres.rst
@@ -68,6 +68,13 @@ Extra (optional)
should send a keepalive message to the server.
* ``client_encoding``: specifies client encoding(character set) of the
client connection.
Refer to `Postgres supported character sets
<https://www.postgresql.org/docs/current/multibyte.html>`_
+ * ``cursor`` - Specifies the cursor type to use when querying the
database. You can choose one of the following:
+
+ - ``dictcursor``: Returns query results as Python dictionaries using
``psycopg2.extras.DictCursor``.
+ - ``realdictcursor``: Similar to ``DictCursor``, but uses
``psycopg2.extras.RealDictCursor`` for slightly better performance.
+ - ``namedtuplecursor``: Returns query results as named tuples using
``psycopg2.extras.NamedTupleCursor``.
+
+ For more information, refer to the psycopg2 documentation on `connection
and cursor subclasses
<https://www.psycopg.org/docs/extras.html#connection-and-cursor-subclasses>`_.
More details on all Postgres parameters supported can be found in
`Postgres documentation
<https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING>`_.