Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #8737 -- Made the PostgreSQL version number detection more flex…

…ible.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 70911bf98d5df4125c86a6c9e21e1df635979f81 1 parent 238477f
@malcolmt malcolmt authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 django/db/backends/postgresql/version.py
View
7 django/db/backends/postgresql/version.py
@@ -4,7 +4,12 @@
import re
-VERSION_RE = re.compile(r'PostgreSQL (\d+)\.(\d+)\.')
+# This reg-exp is intentionally fairly flexible here. Require only the major
+# and minor version numbers, but need to be able to handle standard stuff like:
+# PostgreSQL 8.3.6
+# EnterpriseDB 8.3
+# PostgreSQL 8.3 beta4
+VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)')
def get_version(cursor):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.