Showing with 2 additions and 1 deletion.
  1. +1 −1 python/plugins/db_manager/db_plugins/postgis/connector.py
  2. +1 −0 src/providers/postgres/qgspostgresfeatureiterator.cpp
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def updateTableColumn(self, table, column, new_name=None, data_type=None, not_nu
if self.has_geometry_columns and not self.is_geometry_columns_view:
schema, tablename = self.getSchemaTableName(table)
schema_where = u" f_table_schema=%s AND " % self.quoteString(schema) if schema is not None else ""
sql = u"UPDATE geometry_columns SET f_geometry_column=%s WHERE %s f_table_name=%s AND f_geometry_column=%s" % (self.quoteString(new_name), schema_where, self.quoteString(tablename), self.quoteString(name))
sql = u"UPDATE geometry_columns SET f_geometry_column=%s WHERE %s f_table_name=%s AND f_geometry_column=%s" % (self.quoteString(new_name), schema_where, self.quoteString(tablename), self.quoteString(column))
self._execute(c, sql)

self._commit()
Expand Down
1 change: 1 addition & 0 deletions src/providers/postgres/qgspostgresfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
{
// reloading the fields might help next time around
rewind();
P->loadFields();
return false;
}
}
Expand Down