Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qgib opened this issue Sep 6, 2018 · 1 comment · Fixed by #31929
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin

Comments

@qgib
Copy link
Contributor

qgib commented Sep 6, 2018

Author Name: Matt Yoder (@yomatters)
Original Redmine Issue: 19788
Affected QGIS version: 3.3(master)
Redmine category:db_manager


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.

@qgib
Copy link
Contributor Author

qgib commented Sep 6, 2018

Author Name: Giovanni Manghi (@gioman)


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


  • operating_system was changed from Windows 7 to
  • version was changed from 3.2.2 to 3.3(master)

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin labels May 25, 2019
nyalldawson pushed a commit that referenced this issue Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant