My problem is loading view table from Postgres.
Here is my view table:
SELECT h1.gid, h1.st_buffer
FROM vmo_buffer_2m h1
LEFT JOIN vodomjeri h2 ON st_intersects(h1.st_buffer, h2.geom)
WHERE h2.gid IS NULL;
and that works normally in qgis.
When change last row with: WHERE h2.gid IS NOT NULL;
I can see sql query normally with results in pgAdmin, but adding this view table in qgis show error: (st_buffer) sql= is an invalid layer and cannot be loaded.