Feature request #19278

Customize function "Update SQL Layer"

Added by Michael Gieding over 5 years ago.

Status:Open
Priority:Low
Assignee:-
Category:DB Manager
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:27106

Description

Hello everybody,

in QGIS 3.2, on Fedora 27, I used the function "Update SQL Layer" in the layer context menu for the first time.
When used, the DB-Manager opens with the query "select * from <table>" and displays the result in the lower part of the window.

In my scenario I used the function on a layer that was loaded from a local postgresql database with an active filter to reduce
the amount of data. The complete table has got originally 4 million rows with addresses.
Therefore "Update SQL Layer" initiated the "select * from ..." to load all 4 million rows and display them in the
DB-Manager, right? My system completely hung up. In the end I had to kill QGIS and reboot the computer to continue my work.

OK, this could also happen, if I add a new layer from postgresql without filtering. But the above situation could also happen
when I hit the function in the context menu by mistake.

I would like to suggest, that the function uses in addition to the "select..." the filter expression, if one is set for the layer.
Another option could be to add a limit to the select-statement.
Maybe it could be something for a future version.

Nevertheless many thanks to you all who work on QGIS.
Great job for a great peace of software.

Best regards,
Michael

Also available in: Atom PDF