3

The following query executes in 0.149 seconds but the results will not display in the box in the bottom half of the DB Manager window, which I assume is the results window (PgAdmin returns 7 rows with same query):

select * from region;

The query runs in PgAdmin4 and the results are shown in PgAdmin upon execution returning the 7 rows.

The view from this query can be created in DB Manager after execution and added to the canvas in QGIS.

I'm running QGIS 3.12.2 (I upgraded today to see if it would fix the issue having encountered this in 3.12 last week).

SQL result window is blank but should display results from 7 rows

6
  • 1
    What about select * from public.region; or select * from "region"; do the other tables work?
    – HeikkiVesanto
    Commented Apr 20, 2020 at 20:29
  • @HeikkiVesanto, executes as public.region but still does not display in results window. This applies to all my databases in PostGIS in DB Manager, queried tables don't show results after a query. Results are displayed when performing an SQL in DB Manager for GeoPackage or Spatialite though.
    – Shane Rich
    Commented Apr 21, 2020 at 14:31
  • Queries work fine for me with QGIS 3.12.1. Do you have read permissions on the table and schema?
    – HeikkiVesanto
    Commented Apr 21, 2020 at 14:48
  • @HeikkiVesanto yes I believe so; it's data from the QGIS tutorial data package. Tutorial 19, Using Spatial Databases in QGIS.
    – Shane Rich
    Commented Apr 22, 2020 at 10:50
  • And can you see the data when you click on the table in DB Manager and go to the Table tab? Are you using the same PostgreSQL account in PgAdmin4 and DB Manager?
    – HeikkiVesanto
    Commented Apr 22, 2020 at 11:34

2 Answers 2

4

Having read this post on GitHub today (https://github.com/qgis/QGIS/issues/36205#issuecomment-627026433), I tried to run the query without a semicolon and it worked:

select * from region

0

I had similar problem (which I just solved using this thread)

My OS is Manjaro and it seemed that some of the plugins were not shipped properly/could not be loaded. I had to follow the directions in the thread mentioned above.

Especially:

sudo pacman -S python-gdal python-psycopg2 python-owslib python-pygments

seemed to do the trick.

I encountered a problem when installing the gdal package. I got the following errors

error: failed to commit transaction (conflicting files)
python-numpy: /usr/bin/f2py exists in filesystem
python-numpy: /usr/bin/f2py3 exists in filesystem
Errors occurred, no packages were upgraded.

Based on the answer here I had to manually (as pacman and pip uninstall did not had any effect) remove the files in question by running the following commands

sudo rm /usr/bin/f2py
sudo rm /usr/bin/f2py3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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