[QGIS-trac] [Quantum GIS] #3429: Can't chose edit widget "Enumeration" for empty postgres tables

Quantum GIS qgis at qgis.org
Fri Jan 21 15:21:39 EST 2011


#3429: Can't chose edit widget "Enumeration" for empty postgres tables
------------------------------------------------+---------------------------
   Reporter:  anitagraser                       |              Owner:  nobody       
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.7.0
  Component:  Digitising                        |            Version:  Trunk        
   Keywords:                                    |   Platform_version:               
   Platform:  All                               |           Must_fix:  No           
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 It's not possible to chose an edit widget of type "Enumeration" as long as
 the underlying table is empty.

 You can test using:

 {{{
 CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue',
 'purple');
 CREATE TABLE teste
 (
 rain rainbow,
 the_geom geometry
 );
 }}}

 When one line is added, everything works as expected.

 According to user cremat0rio on the related forum topic
 (http://forum.qgis.org/viewtopic.php?f=2&t=7834) it's possible to use the
 following line to populate the enum widget:

 {{{
 SELECT enum_range(null::rainbow);
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3429>
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