﻿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
6987	manage.py syncdb: Error with the PostgreSQL version.	Manuel Lanctot <sensoz@…>	nobody	"When I tried to initialize the database for the first time, I got the following error.
{{{
C:\django\blog>python manage.py syncdb
Traceback (most recent call last):
  File ""manage.py"", line 11, in <module>
    execute_manager(settings)
  File ""C:\Python25\Lib\site-packages\django\core\management.py"", line 1672, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File ""C:\Python25\Lib\site-packages\django\core\management.py"", line 1571, in execute_from_command_line
    action_mapping[action](int(options.verbosity), options.interactive)
  File ""C:\Python25\Lib\site-packages\django\core\management.py"", line 504, in syncdb
    cursor = connection.cursor()
  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,'
}}}

Doing a SELECT version() returns: ('PostgreSQL 8.3.1, compiled by Visual C++ build 1400',)[[BR]]
So there is a trailing comma after the version number.
"		closed	Database layer (models, ORM)	0.96		duplicate	psycopg2, postgresql, syncdb		Unreviewed	1	0	0	0	0	0
