I imported a PostGIS table (with geometry) from my PostgreSQL database as a layer in QGIS. Later, I edited the table using PostgreSQL UPDATE commands.

Is there a way to quickly update (like a refresh ↻ command?) the layer in QGIS with the new attributes or geometry without having to remove the layer and reconnect with the database?


I think all you need to do is zoom in or out in your map canvas.

You can also uncheck and check again the render checkbox in the right left corner.

Regarding the attribute table you might have to close it and open it again.

| improve this answer | |
  • Does this actually work for you? Because it doesn't seem to make a difference for me. – BenjaminGolder Apr 11 '14 at 15:18
  • Sorry, the render does not work. But the Zoom in and out does. – Alexandre Neto Apr 11 '14 at 15:25
  • I'm accepting this because it seems to work consistently now, but I could have sworn this didn't work earlier. I opened and closed the attribute table several times before posting the question. Weird. Thanks! – BenjaminGolder Apr 11 '14 at 18:25
  • Just a note that it's the same for sql server tables. – Eric Mar 12 '18 at 4:41

I've found that (re)sorting the field (by clicking the field name header at the top) will force the attribute table to refresh with the new values. This also works if you're editing directly in QGIS.

You can get the map data to update either by zooming or just a quick nudge/pan with the mouse, or by hitting the refresh button.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.