Updates the benchmark logic.

This commit is contained in:
Bertrand Bordage 2018-05-05 00:54:17 +02:00
parent 2b6e80730a
commit 94bcc4f499

View file

@ -87,7 +87,7 @@ def write_conditions():
# PostgreSQL
with connections['postgresql'].cursor() as cursor:
cursor.execute('SELECT version();')
versions['PostgreSQL'] = re.match(r'^PostgreSQL ([\d\.]+) on .+$',
versions['PostgreSQL'] = re.match(r'^PostgreSQL\s+(\S+)\s',
cursor.fetchone()[0]).group(1)
# MySQL
with connections['mysql'].cursor() as cursor: