[QGIS-Developer] Execute SQL tool
Raymond Nijssen
r.nijssen at terglobo.nl
Thu Oct 16 04:22:48 PDT 2025
Dear devs,
Lately I've been working with the Execute SQL tool on gpkg database
files, cause I'm trying to switch from the DB Manager to the QGIS native
tool. I was told the DB Manager is going to be deprecated in the near
future. Is that the goal?
I'm wondering if other people are using the 'Execute SQL' tool as well,
as I'm not really satisfied with the current functionality and I cannot
find any complains in the mailing list or github issues.
Some problems I encounter:
* The result table is (randomly?) not showing the FID or other PK
columns, nor the geometry column. But those are often important while
writing SQL queries.
* Loading the QueryLayer always creates a multigeometry layer not
showing anything on the map. (Btw I think QGIS should be able to render
multigeometries, or at least to set a 'point', 'line' or 'polygon' style
to the multigeometry layer to force it rendering that type.)
* The cursor somehow jumps randomly to other lines when (re)focusing on
the SQL S
* The clear button works *very* well, when you accidentally press it you
loose the entire query without warning and ctrl-Z won't bring it back.
* The error widget is large and leaving only a few lines of the SQL
editor to find an fix my error. The splitter between them does not show
the handle for resizing the widgets.
If developers are interested in fixing this, please let me know. I'm
happy to help and test and I can also try finding some funding for this.
For me, a more productive SQL tool in QGIS would be:
* In a dockable panel
* Connected to one or more layers that update every time I execute my
SQL (like the map in DBeaver)
QGIS could be the best geo SQL editor in the world!
There are current issues:
https://github.com/qgis/QGIS/issues?q=is%3Aissue%20state%3Aopen%20%27execute%20sql%27
Should I add all mine?
Kind regards,
Raymond
More information about the QGIS-Developer
mailing list