[QGIS-trac] Re: [Quantum GIS] #2911: Enable the query builder for view that don't have unique id

Quantum GIS qgis at qgis.org
Wed Jul 28 15:51:09 EDT 2010


#2911: Enable the query builder for view that don't have unique id
-----------------------------------------------------+----------------------
        Reporter:  pinux                             |         Owner:  jef                         
            Type:  bug                               |        Status:  new                         
        Priority:  major: does not work as expected  |     Milestone:  Version 1.6.0               
       Component:  Data Provider                     |       Version:  Trunk                       
      Resolution:                                    |      Keywords:  Postgis, Query Builder, View
Platform_version:                                    |      Platform:  Windows                     
        Must_fix:  No                                |   Status_info:  0                           
-----------------------------------------------------+----------------------
Changes (by jef):

  * owner:  nobody => jef
  * status:  reopened => new


Comment:

 Replying to [comment:2 pinux]:
 > I have already found a workaround. But, if I can add the Sql statement
 under the Sql column in the "Add to Postgis table(s)" and open it in qgis
 I don't see why it should not be possible to open the Query builder and do
 it in a much easier way.

 The query builder needs an layer and alters it's filter/subset string.  So
 the insertion dialog creates the layer and passes it to the query builder
 - creating the layer only works with a unique key.  Entering the where
 clause directly on the other hand doesn't create an layer and isn't
 validated immediately, the subset string is just passed on to the layer on
 creation.

 So both option make sense, although it isn't really obvious.



 > Or if it should not be possible to add a query on a view that don't have
 unique id (like you suggest), it should not be possible to add the query
 directly under the Sql column, like it is possible now.
 > If you think that it don't make sense, close again.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/2911#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list