﻿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
4603	Psycopg2 - error setting time zone	Jonas von Poser	Adrian Holovaty	"There's a bug in Psycopg2 that doesn't let connect to the data base:

{{{
In [1]: from django.db import connection

In [2]: cursor = connection.cursor()
---------------------------------------------------------------------------
<class 'psycopg2.ProgrammingError'>       Traceback (most recent call last)

/home/*****/<ipython console> in <module>()

/usr/local/lib/python2.5/django/db/backends/postgresql_psycopg2/base.py in cursor(self)
     52         cursor.tzinfo_factory = None
     53         if set_tz:
---> 54             cursor.execute(""SET TIME ZONE %s"", [settings.TIME_ZONE])
     55         global postgres_version
     56         if not postgres_version:

<class 'psycopg2.ProgrammingError'>: argument formats can't be mixed
}}}
http://code.djangoproject.com/browser/django/trunk/django/db/backends/postgresql_psycopg2/base.py#L54
[[BR]][[BR]][[BR]]
I found the same bug here: http://initd.org/tracker/psycopg/ticket/178
[[BR]][[BR]]
'''""Please, also note that using lists as arguments is wrong. It works only by chance and would probably raise an error in the future. Use tuples or dictionaries.""'''
"		closed	Database layer (models, ORM)	dev		duplicate	postgresql psycopg2		Unreviewed	0	0	0	0	0	0
