Commits

Mike Bayer committed 26db091 Merge

Merged in dahlia/sqlalchemy/enterprisedb (pull request #15)

  • Participants
  • Parent commits db8b4f7, ef3dcb1

Comments (0)

Files changed (2)

File lib/sqlalchemy/dialects/postgresql/base.py

 
     def _get_server_version_info(self, connection):
         v = connection.execute("select version()").scalar()
-        m = re.match('PostgreSQL (\d+)\.(\d+)(?:\.(\d+))?(?:devel)?', v)
+        m = re.match(
+            '(?:PostgreSQL|EnterpriseDB) '
+            '(\d+)\.(\d+)(?:\.(\d+))?(?:\.\d+)?(?:devel)?',
+            v)
         if not m:
             raise AssertionError(
                     "Could not determine version from string '%s'" % v)

File test/dialect/test_postgresql.py

              'GCC gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)', (8, 3,
              8)),
              ('PostgreSQL 8.5devel on x86_64-unknown-linux-gnu, '
-             'compiled by GCC gcc (GCC) 4.4.2, 64-bit', (8, 5))]:
+             'compiled by GCC gcc (GCC) 4.4.2, 64-bit', (8, 5)),
+             ('EnterpriseDB 9.1.2.2 on x86_64-unknown-linux-gnu, '
+             'compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50), '
+             '64-bit', (9, 1, 2))]:
             eq_(testing.db.dialect._get_server_version_info(MockConn(string)),
                 version)