Super! I didn't realize that the geometry_column view could be edited... So I added at the end of the view sql statement:
AND c.relname not like 'entities' that was converted by the system to AND c.relname !~~ 'entities'::text Then in qgis I had to specify that it must look only in geoetry_columns table and the table entities disappeared! Thnx very, very much! Pietro 2012/10/22 Francois Hugues <hugues.franc...@irstea.fr> > ** > Your view is defined by a sql select so you should try to leave this > select as is except for the where clause where you could add something like > : and c.relname not like 'your_table_name' > > I tried it with one of my table and this was ok, the table disappeared > from the geometry_columns view > > Hugues. > > > ------------------------------ > *De :* postgis-users-boun...@postgis.refractions.net [mailto: > postgis-users-boun...@postgis.refractions.net] *De la part de* Pietro > Rossin > *Envoyé :* lundi 22 octobre 2012 11:40 > *À :* postgis-users@postgis.refractions.net > > *Objet :* Re: [postgis-users] How to make some geometry column visible to > Qgis > > Hello Hugues > in my database I have both views and a main table on which these views > pick data from. > All of them have their own geometry column registered into the geometry > column set by postgis > > My problem is that the main table (a huge one with mixed geometry data > type) has its own geometry column. > When qgis starts the connection to this db automatically looks into the > geometry column set and find the geom.column relative to the main table, so > it searches that table for the geometry type and take a lot of time to do > it... > > How can I hide this geometry column? > > Thnx > Pietro > > 2012/10/22 Francois Hugues [via PostGIS] <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5000687&i=0> > > > > Hello >> >> "This because I cannot remove the entities geometry column unless I >> remove the entity table first. >> And if I don't remove (or make invisible to qgis if possible) the >> entities geometry column it slow down the qgis connection." >> >> Did you try to edit the view, using the where clause to exclude the >> tables you don't want to be seen by postgis ? >> >> Hugues. >> >> >> ------------------------------ >> *De :* [hidden >> email]<http://user/SendEmail.jtp?type=node&node=5000686&i=0>[mailto:[hidden >> email] <http://user/SendEmail.jtp?type=node&node=5000686&i=1>] *De la >> part de* Pietro Rossin >> >> *Envoyé :* lundi 22 octobre 2012 09:25 >> *À :* [hidden email]<http://user/SendEmail.jtp?type=node&node=5000686&i=2> >> *Objet :* Re: [postgis-users] How to make some geometry column visible >> to Qgis >> >> DELETE FROM geometry_columns WHERE f_table_name = 'puntigronda'; >> >> Query returned successfully: 0 rows affected, 0 ms execution time. >> >> INSERT INTO geometry_columns (f_table_catalog,f_table_schema, >> f_table_name, f_geometry_column, coord_dimension, srid,type) >>  VALUES ('','', 'puntigronda', 'the_geom', 3, 3004,'POINTS'); >> >> Query returned successfully: 0 rows affected, 16 ms execution time. >> >> select relkind from pg_class where relname = 'geometry_columns'; >> >> returns: >> "v" >> >> What is this? >> >> By the way >> If my technique works, is it still better to explode the "entities" table >> in one of this cases: >> >> a) single layers >> b) same kind of geometries >> >> in both cases table permanent. >> >> This because I cannot remove the entities geometry column unless I remove >> the entity table first. >> And if I don't remove (or make invisible to qgis if possible) the >> entities geometry column it slow down the qgis connection. >> >> Thanks for your help >> Pietro >> >> 2012/10/22 Sandro Santilli [via PostGIS] <[hidden >> email]<http://user/SendEmail.jtp?type=node&node=5000685&i=0> >> > >> >>> On Mon, Oct 22, 2012 at 08:40:07AM +0200, Pietro Rossin wrote: >>> >>> > DELETE FROM geometry_columns WHERE f_table_name = 'puntigronda'; >>> ... >>> > Is there something wrong? >>> >>> What's wrong is that the "geometry_columns" table should be a view, >>> in PostGIS-2.0. If it is a view, your DELETE and INSERT and UPDATE >>> to it should have no effect. >>> >>> Can you verify this first ? >>> The DELETE/INSERT/UPDATE commands all return the number of affected >>> rows. If PostGIS is correctly installed you should alwyas get 0, >>> no matter what you try to insert/delete/update. >>> >>> Also check: >>> select relkind from pg_class where relname = 'geometry_columns'; >>> >>> --strk; >>> >>>  http://www.cartodb.com - Map, analyze and build applications with >>> your data >>> >>>                     ~~ >>> http://strk.keybit.net >>> >>> _______________________________________________ >>> postgis-users mailing list >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5000684&i=0> >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> >>> http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000684.html >>> To unsubscribe from How to make some geometry column visible to Qgis, click >>> here. >>> NAML<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >>> >> >> >> ------------------------------ >> View this message in context: Re: How to make some geometry column >> visible to >> Qgis<http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000685.html> >> Sent from the PostGIS - User mailing list >> archive<http://postgis.17.n6.nabble.com/PostGIS-User-f3516033.html>at >> Nabble.com. >> >> _______________________________________________ >> postgis-users mailing list >> [hidden email] <http://user/SendEmail.jtp?type=node&node=5000686&i=3> >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000686.html >> To unsubscribe from How to make some geometry column visible to Qgis, click >> here. >> NAML<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > ------------------------------ > View this message in context: Re: How to make some geometry column > visible to > Qgis<http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000687.html> > Sent from the PostGIS - User mailing list > archive<http://postgis.17.n6.nabble.com/PostGIS-User-f3516033.html>at > Nabble.com. > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users