Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.0.X] Fixed #8737 -- Made the PostgreSQL version number detection m…

…ore flexible.

Backport of r9931 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a899f7c commit 3fc72ca8a819dec0da5506dce810238df86a8ae4 @malcolmt malcolmt committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 django/db/backends/postgresql/
7 django/db/backends/postgresql/
@@ -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):

0 comments on commit 3fc72ca

Please sign in to comment.
Something went wrong with that request. Please try again.