              cursor.execute("SELECT version()")
              self.ops.postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
          return cursor
  
  allows_group_by_ordinal = True
  allows_unique_and_pk = True
  autoindexes_primary_keys = True
  needs_datetime_string_cast = True
  needs_upper_for_iops = False
  supports_constraints = True
  supports_tablespaces = False
  uses_case_insensitive_names = False
  
  def typecast_string(s):
      """
      Cast all returned strings to unicode strings.
      """
      if not s and not isinstance(s, str):
 
</s> remove allows_group_by_ordinal = True
allows_unique_and_pk = True
autoindexes_primary_keys = True
needs_datetime_string_cast = False
needs_upper_for_iops = False
supports_constraints = True
supports_tablespaces = False
uses_case_insensitive_names = False

 </s> add  </s> remove allows_group_by_ordinal = True
allows_unique_and_pk = True
autoindexes_primary_keys = True
needs_datetime_string_cast = True
needs_upper_for_iops = False
supports_constraints = False
supports_tablespaces = False
uses_case_insensitive_names = False

 </s> add  </s> remove allows_group_by_ordinal = False
allows_unique_and_pk = False        # Suppress UNIQUE/PK for Oracle (ORA-02259)
autoindexes_primary_keys = True
needs_datetime_string_cast = False
needs_upper_for_iops = True
supports_constraints = True
supports_tablespaces = True
uses_case_insensitive_names = True

 </s> add  </s> remove allows_group_by_ordinal = True
allows_unique_and_pk = True
autoindexes_primary_keys = True
needs_datetime_string_cast = True
needs_upper_for_iops = False
supports_constraints = True
supports_tablespaces = True
uses_case_insensitive_names = False

 </s> add 
              cursor.execute("SELECT version()")
              self.ops.postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
          return cursor
  









  def typecast_string(s):
      """
      Cast all returned strings to unicode strings.
      """
      if not s and not isinstance(s, str):
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/backends/postgresql/base.py