@@ -2008,18 +2008,18 @@ async def connect(dsn=None, *,
2008
2008
If specified, check that the host has the correct attribute.
2009
2009
Can be one of:
2010
2010
2011
- "any": the first successfully connected host
2012
- "primary": the host must NOT be in hot standby mode
2013
- "standby": the host must be in hot standby mode
2014
- "read-write": the host must allow writes
2015
- "read-only": the host most NOT allow writes
2016
- "prefer-standby": first try to find a standby host, but if
2017
- none of the listed hosts is a standby server,
2018
- return any of them.
2019
-
2020
- If not specified will try to use PGTARGETSESSIONATTRS
2021
- from the environment.
2022
- Defaults to "any" if no value is set .
2011
+ - `` "any"`` - the first successfully connected host
2012
+ - `` "primary"`` - the host must NOT be in hot standby mode
2013
+ - `` "standby"`` - the host must be in hot standby mode
2014
+ - `` "read-write"`` - the host must allow writes
2015
+ - `` "read-only"`` - the host most NOT allow writes
2016
+ - `` "prefer-standby"`` - first try to find a standby host, but if
2017
+ none of the listed hosts is a standby server,
2018
+ return any of them.
2019
+
2020
+ If not specified, the value parsed from the *dsn* argument is used,
2021
+ or the value of the ``PGTARGETSESSIONATTRS`` environment variable,
2022
+ or `` "any"`` if neither is specified .
2023
2023
2024
2024
:return: A :class:`~asyncpg.connection.Connection` instance.
2025
2025
@@ -2086,6 +2086,9 @@ async def connect(dsn=None, *,
2086
2086
.. versionchanged:: 0.26.0
2087
2087
Added the *direct_tls* parameter.
2088
2088
2089
+ .. versionchanged:: 0.28.0
2090
+ Added the *target_session_attrs* parameter.
2091
+
2089
2092
.. _SSLContext: https://docs.python.org/3/library/ssl.html#ssl.SSLContext
2090
2093
.. _create_default_context:
2091
2094
https://docs.python.org/3/library/ssl.html#ssl.create_default_context
0 commit comments