Bug report #3036

save to shapefile for postgis layers with too long column names doesn't work

Added by cmoe - almost 9 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System:RedHat Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:13096

Description

Save as to shapefile for postgis layers with tool long column names doens't work.

1. Load a postgis layer with a column that has more then 10 charactes in its name (e.g. archive_date)
2. save as esri shapefile
3. The following error appears:
Export to vector file failed.
Error: created field archive_date not found (OGR error: 
Normalized/laundered field name: 'archive_date' to 'archive_da')
4. The created shapefile is empty

The expected truncation from archive_date to archive_da in the resulting shapefile works (the shp, shx,dbf is created). The dbf shows the truncated archive_da but no features are exported.

Associated revisions

Revision 924d03c4
Added by Jürgen Fischer almost 9 years ago

fix #3036

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision cdf7d444
Added by Jürgen Fischer almost 9 years ago

fix #3036

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

History

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

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

fixed in cdf7d444

#2 Updated by Tudor Bărăscu almost 7 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.6.0 to Version 2.0.0
  • Assignee deleted (nobody -)
  • Status changed from Closed to Reopened

I get same error on several computers, using either 1.8 version or the 1.9 alpha.

Curiously, it does save some features: "Only 8553 of 8580 features written".

#3 Updated by Jürgen Fischer almost 7 years ago

  • Subject changed from save as to shapefile for postgis layers with tool long column names doens't work to save to shapefile for postgis layers with too long column names doesn't work
  • Pull Request or Patch supplied set to No

#4 Updated by Jürgen Fischer almost 7 years ago

Tudor Barascu wrote:

I get same error on several computers, using either 1.8 version or the 1.9 alpha.

Curiously, it does save some features: "Only 8553 of 8580 features written".

Um, you probably get a different error message. This ticket is specifically about fieldnames that start conflicting, when they are truncated.

#5 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF