Feature request #16432

Update the field list in layer.dataProvider().forceReload()

Added by Borys Jurgiel over 7 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider
Pull Request or Patch supplied:No Resolution:wontfix
Easy fix?:No Copied to github as #:24341

Description

Once you load e.g. postgis table into QGIS, there is no way to reload its fields (e.g. after adding a column via psycopg or other concurrent connection), except reloading the whole project of course. The layer.dataProvider().forceReload() assumes the fields structure is constant and only reloads the records.

I noticed it when working with PostGIS, but I suspect it's a provider-independent issue.

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

#2 Updated by Borys Jurgiel about 6 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed
  • Description updated (diff)

layer.setDataSource() can be used instead

Also available in: Atom PDF