Bug report #21353
Query from DB Manager SQL window no longer loads as new layer
|Affected QGIS version:||3.5(master)||Regression?:||Yes|
|Operating System:||Linux (Debian Sid, x86-64)||Easy fix?:||Yes|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||29171|
I've just installed qgis-3.6.0 from sources, built Debian packages (current Debian Sid) and installed them. I opened one of my projects, which uses layers from PostGIS. I issued an SQL query from the SQL Window of DB Manager that returns some lines with geometry columns; so far, so good. I then check the "Load as new layer" box, select the primary key field, choose the correct geometry column and click the "Load" button. Nothing happens. I've uninstalled this 3.6.0 qgis, installed my previous 3.4.4, and the same actions produce a new layer on my project called QueryLayer.
#1 Updated by José de Paula Rodrigues Neto Assis about 1 year ago
Forgot to say that I've started with a clean state in both cases (i.e., I've deleted my .local/share/QGIS before starting up either version to confirm the bug).
The following simple SQL query (requires PostGIS) shows the bug:
select 1 as id, st_geomfromtext('POINT(-47.8669271 -15.7992462)', 4326) as geom;
This result in a layer with a single point in QGIS-3.4.4, and nothing with QGIS-3.6.0.