Bug report #19788

DB Manager: Renaming a PostGIS geometry column causes it to lose its geometry type and SRS

Added by Matt Yoder about 2 years ago. Updated about 2 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27613

Description

Using the Field Properties dialog box in DB Manager to rename a geometry column in a PostGIS table causes the column to lose its geometry type and spatial reference system information. The geometry type and SRS appear in the Length field in the Field Properties dialog box (see attached screenshot). However, the dialog box's validation logic expects the Length value to be an integer, which causes the geometry type and SRS to be lost when the OK button is clicked.

Steps to reproduce:
1. In DB Manager, select a PostGIS layer, and choose Table -> Edit Table.
2. Select the geometry column, and click Edit Column.
3. Change the field name, and click OK. The field type of the geometry column is now "geometry" with no geometry type or SRS.

field_properties.png - Field Properties dialog box showing geometry type and SRS in the Length field (12.1 KB) Matt Yoder, 2018-09-06 05:54 PM

History

#1 Updated by Giovanni Manghi about 2 years ago

  • Operating System deleted (Windows 7)
  • Affected QGIS version changed from 3.2.2 to 3.3(master)

Confirmed, does not happens if renaming the column via SQL.

Also available in: Atom PDF