Bug report #6800

PostGIS provider layer loses ability to add/delete columns

Added by Larry Shaffer over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:High
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:15948

Description

When adding a PostGIS provider layer via the Layers menu/toolbar action, the Browser, or DB Manager, and the layer's table originates in the 'public' schema, the datasource for the layer shows no schema qualification prior to the table name (e.g. "mytable" instead of "public"."mytable"). This appears to be currently fixed in master branch (all datasource have schema qualifications).

However, when opening a 1.8 project with master branch those layers without qualifying schemas load, but do not allow editing/deleting of attribute columns, while it was allowed in 1.8. Editing the project file and adding the schema qualification returns the functionality of adding/deleting columns. So, this is a regression.

I made a quick patch to assume 'public' schema for all datasource without one, but it is probably NOT the appropriate fix. Issues with that might be databases whose search_path doesn't contain 'public', or where schemas are not used at all, for portability reasons.

postgres-public_patch.diff Magnifier (626 Bytes) Larry Shaffer, 2012-11-30 03:52 PM

Associated revisions

Revision 1dc75f35
Added by Jürgen Fischer over 11 years ago

fix #6800 (introduced with 0dc01f5ff)

History

#1 Updated by Larry Shaffer over 11 years ago

Video of issue, provided by Salvatore Larosa:

http://lrssvt.ns0.it/img/180vsmaster_Postgres.ogv (5 MB)

#2 Updated by Marco Hugentobler over 11 years ago

  • Assignee set to Jürgen Fischer

#3 Updated by Jürgen Fischer over 11 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF