﻿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
11285	postgresql server version as a static variable	findepi	nobody	"In {{{django.db.backends.postgresql.base}}} and {{{django.db.backends.postgresql_psycopg2.base}}} modules there is a code:

{{{
#!python
cursor = self.connection.cursor()
if set_tz:
    cursor.execute(""SET TIME ZONE %s"", [settings_dict['TIME_ZONE']])
    if not hasattr(self, '_version'):
        self.__class__._version = get_version(cursor)
    if self._version[0:2] < (8, 0):
}}}

It means that the server version is checked only at the first connection. I understand that django does not support and maybe will never support multiple different db connections from one process, but this may brake things even in case of database failover
E.g. at one network address there may be postgresql servers of different version available.
"	Bug	closed	Database layer (models, ORM)	1.0	Normal	fixed			Accepted	0	0	0	0	0	0
