Skip to content

Commit

Permalink
feat: Add GaussDB detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ferstar committed Jun 15, 2023
1 parent 2f20bae commit 0be6023
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions asyncpg/connection.py
Expand Up @@ -2352,6 +2352,13 @@ def _detect_server_capabilities(server_version, connection_settings):
plpgsql = False
sql_reset = False
sql_close_all = False
elif 'gauss' in getattr(connection_settings, 'application_name', '').lower():
# GaussDB detected.
advisory_locks = True
notifications = False
plpgsql = False
sql_reset = True
sql_close_all = True
else:
# Standard PostgreSQL server assumed.
advisory_locks = True
Expand Down

0 comments on commit 0be6023

Please sign in to comment.