Bug report #3429

Can't chose edit widget "Enumeration" for empty postgres tables

Added by Anita Graser almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Digitising
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:invalid
Crashes QGIS or corrupts data: Copied to github as #:13489

Description

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);

History

#1 Updated by Jürgen Fischer almost 10 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

already fixed in 78cc7abf (SVN r15049).

Also available in: Atom PDF