Bug report #17070

saving a layer with boolean fields fails

Added by Regis Haubourg over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Paul Blottiere
Category:Vectors
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24969

Description

I have a postgres layer with a boolean field.
Save as gpkg fails in master with this message:

Export to vector file failed.
Error: unsupported type for field est_selective

using value maps substitution works.

Associated revisions

Revision 3bbe71d9
Added by Paul Blottiere over 6 years ago

Fixes #17070 by considering bool fields as OGR integer fields with boolean subtype

Revision bc90210e
Added by Paul Blottiere over 6 years ago

Merge pull request #5620 from pblottiere/bugfix_gpkg_bool

[bugfix] Fixes #17070 by considering bool fields as OGR integer fields with boolean subtype

History

#1 Updated by Regis Haubourg over 6 years ago

Using spatialite provider target produces the same error.

#2 Updated by Regis Haubourg over 6 years ago

  • Subject changed from saving a layer with boolean fields to gpkg fails to saving a layer with boolean fields fails
  • Regression? changed from No to Yes

In fact, shp are affected too, so all file types I suppose

#3 Updated by Giovanni Manghi over 6 years ago

  • Category changed from Data Provider/OGR to Vectors

Does it work as expected on 2.18.* ?

#4 Updated by Regis Haubourg over 6 years ago

Yes, tested right now.
Boolean are converted to string fields with "f/t" values in it.
And BTW, saving takes ages in master when it's only a few seconds in release.

#5 Updated by Giovanni Manghi over 6 years ago

And BTW, saving takes ages in master when it's only a few seconds in release.

better file a separate regression ticket.

#6 Updated by Paul Blottiere over 6 years ago

  • Assignee set to Paul Blottiere

#7 Updated by Paul Blottiere over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF