Author: mtredinnick
Date: 2009-03-01 01:18:57 -0600 (Sun, 01 Mar 2009)
New Revision: 9931

Modified:
   django/trunk/django/db/backends/postgresql/version.py
Log:
Fixed #8737 -- Made the PostgreSQL version number detection more flexible.

Modified: django/trunk/django/db/backends/postgresql/version.py
===================================================================
--- django/trunk/django/db/backends/postgresql/version.py       2009-03-01 
07:12:38 UTC (rev 9930)
+++ django/trunk/django/db/backends/postgresql/version.py       2009-03-01 
07:18:57 UTC (rev 9931)
@@ -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):
     """


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to