From b6d3f60791834ead92564fc58afebc2c3eb4a2ff Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 7 Jun 2017 12:30:22 -0400 Subject: Parse for Postgresql version w/ "beta" Continuing with the fix that correctly handles Postgresql version string "10devel" released in 1.1.8, an additional regexp bump to handle version strings of the form "10beta1". While Postgresql now offers better ways to get this information, we are sticking w/ the regexp at least through 1.1.x for the least amount of risk to compatibility w/ older or alternate Postgresql databases. Change-Id: I12ddb06465f7dcf80563c27632441ef5963f60d4 Fixes: #4005 --- lib/sqlalchemy/dialects/postgresql/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql') diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 2510bc975..e583bd5cf 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -2303,7 +2303,7 @@ class PGDialect(default.DefaultDialect): v = connection.execute("select version()").scalar() m = re.match( r'.*(?:PostgreSQL|EnterpriseDB) ' - r'(\d+)\.?(\d+)?(?:\.(\d+))?(?:\.\d+)?(?:devel)?', + r'(\d+)\.?(\d+)?(?:\.(\d+))?(?:\.\d+)?(?:devel|beta)?', v) if not m: raise AssertionError( -- cgit v1.2.1