Bug report #15910

DB manager: Connection to PostGIS from QGIS3 fails

Added by Paolo Cavallini almost 3 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23827

Description

In QGIS master the connection to PostGIS through the browser is OK, whereas the same through DBM attempts to find a 'g' schema, which is not there, and fails miserably:

SELECT has_schema_privilege('g', 'CREATE'), has_schema_privilege('g',
'USAGE')

Associated revisions

Revision cfe8dfed
Added by Arnaud Morvan over 2 years ago

[db_manager] Fix DBConnector.getSchemaTableName

Fix #15910

Revision 4f4d63a6
Added by Arnaud Morvan over 2 years ago

[db_manager] Fix DBConnector.getSchemaTableName

2.18 Backport
Ref #15910

History

#1 Updated by amedeo fadini almost 3 years ago

Me too, I think that for some reason the self.tree.currentItem() returns value 'g' in dbmanager.py at line 127

def refreshTabs(self):
index = self.tabs.currentIndex()
item = self.tree.currentItem()
table = self.tree.currentTable()

#2 Updated by Giovanni Manghi almost 3 years ago

  • Priority changed from Normal to Severe/Regression
  • Target version set to Version 3.0

#3 Updated by Pedro Venâncio over 2 years ago

Still true with QGIS code revision 5bfc0a1 (DB Manager 0.1.20)

schema "g" does not exist

#4 Updated by Arnaud Morvan over 2 years ago

#5 Updated by Giovanni Manghi over 2 years ago

  • Regression? set to Yes

#6 Updated by Giovanni Manghi over 2 years ago

  • Priority changed from Severe/Regression to High

#7 Updated by Giovanni Manghi over 2 years ago

  • Easy fix? set to No

#8 Updated by Arnaud Morvan over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#9 Updated by Paolo Cavallini over 2 years ago

  • Description updated (diff)

Confirmed, thanks Arnaud.

#10 Updated by Sandro Santilli over 2 years ago

This needed a backport to 2.18 branch, I'm tentatively doing that as part of DBManager automated testing: https://github.com/qgis/QGIS/pull/4685

#11 Updated by Sandro Santilli over 2 years ago

BTW: you can find the `g` schema thing in Travis traces, so the automated test is giving its fruits: https://travis-ci.org/qgis/QGIS/jobs/240120546#L864

Also available in: Atom PDF