﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7090	postgresql_psycopg2 blows up when you try to create a cursor with postgresql 8.3.1 on windows	grand@…	nobody	"On windows, configured to work with postgresql 8.3.1 creating a cursor blows up due to the format of the postgresql version string.


{{{
>>> from django.db import connection
>>> cursor = connection.cursor()
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""C:\python25\lib\site-packages\django\db\backends\postgresql_psycopg2\base.py"", line 57, in cursor
    postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
ValueError: invalid literal for int() with base 10: '1,'
}}}

The version string returned by postgresql was 'PostgreSQL 8.3.1, compiled by Visual C++ build 1400'[[BR]]
It is choking on the comma after the version number.  Here is a modified base.py line 57 that fixes the problem:

{{{
            postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].replace(',','').split('.')]
}}}
"		closed	Database layer (models, ORM)	0.96		fixed			Unreviewed	1	0	0	0	0	0
