Ticket #19259: 19259.diff

File 19259.diff, 748 bytes (added by hgeerts@…, 12 years ago)

group_by pk is supported starting 9.1 http://www.postgresql.org/docs/9.1/static/sql-select.html#SQL-GROUPBY

  • django/db/backends/postgresql_psycopg2/base.py

     
    194194                            self.ops.set_time_zone_sql(), [tz])
    195195            self.connection.set_isolation_level(self.isolation_level)
    196196            self._get_pg_version()
     197            if self.pg_version >= 90100:
     198                self.features.allows_group_by_pk = True
    197199            connection_created.send(sender=self.__class__, connection=self)
    198200        cursor = self.connection.cursor()
    199201        cursor.tzinfo_factory = utc_tzinfo_factory if settings.USE_TZ else None
Back to Top