Skip to content

Commit afc1038

Browse files
mfusseneggerelprans
authored andcommitted
Add CrateDB detection
To support connection pooling if used with https://github.com/crate/crate This depends on crate/crate#6476 (So this will only work starting with CrateDB 2.3)
1 parent c04576d commit afc1038

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

asyncpg/connection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,13 @@ def _detect_server_capabilities(server_version, connection_settings):
15831583
plpgsql = False
15841584
sql_reset = False
15851585
sql_close_all = False
1586+
elif hasattr(connection_settings, 'crate_version'):
1587+
# CrateDB detected.
1588+
advisory_locks = False
1589+
notifications = False
1590+
plpgsql = False
1591+
sql_reset = False
1592+
sql_close_all = False
15861593
else:
15871594
# Standard PostgreSQL server assumed.
15881595
advisory_locks = True

0 commit comments

Comments
 (0)