Bug report #19788
DB Manager: Renaming a PostGIS geometry column causes it to lose its geometry type and SRS
|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|
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.