[postgis-users] how to refresh postgis layer in QGIS?

Margie Roswell mroswell at gmail.com
Mon Apr 8 21:25:46 PDT 2013


Does anyone know how to refresh a postGIS layer in QGIS?


For instance, let's say we alter the table to add a new column in
PgAdmin III, and want to use that new column in QGIS? For now, i only
have been able to reload the layer anew.

here are some failed things I've tried in the python console.

>>> from PyQt4.QtCore import *

>>> self.iface.mapCanvas().refresh()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'self' is not defined

>>> layers = self.iface.mapCanvas().layers()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'self' is not defined





--
http://FarmBillPrimer.org
http://www.BaltimoreUrbanAg.org (Please send events; This site is hungry.)
http://www.ExcellentNutrition.org
http://www.packtpub.com/drupal-5-views-recipes/book


More information about the postgis-users mailing list