Error on qGIS with postgresql views

المشرف العام

Administrator
طاقم الإدارة
I have a DB on postgresql with postgis.There are some tables and views in the DB.With pgAdmin I can make requests on the tables, on the views, all is working.I add tables in qGIS 2.8, it's working, I can read, write, modify the data.I can add views in qGIS, for all of them except two, it works.So there are two views, which I can't add in qGIS, it make an error window : "is an invalid layer and cannot be loaded".

But I have tested on pgAdmin, the views are good and quick the load data.

So I modify the views with :ADD OR REPLACE VIEW x AS (/SQL code/ LIMIT 10);

And now I can add the views in qGIS, and it works.

I modify the views to remove the LIMIT 10.And in qGIS I can see the views and ask informations about entities, all is good.

But if I save the gQIS's project, and restart qGIS, on the shape's loading it failed.

I think the problem is in qGIS. But how I can know how qGIS check all the shapes, I can solve the problem.

Thanks for all your ideas.

Best regards.



أكثر...
 
أعلى