mirror of
https://github.com/django/django.git
synced 2024-12-25 18:46:22 +00:00
Fixed #8737 -- Made the PostgreSQL version number detection more flexible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
238477f90c
commit
70911bf98d
@ -4,7 +4,12 @@ Extracts the version of the PostgreSQL server.
|
|||||||
|
|
||||||
import re
|
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):
|
def get_version(cursor):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user