Bug report #6800
PostGIS provider layer loses ability to add/delete columns
|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|
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.