Bug report #9037

Error: database "" does not exist

Added by Sandro Santilli about 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:Sandro Santilli
Category:DB Manager
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17692

Description

Opening a PostGIS connection whose name hasn't been specified in the connection manager (to rely on libpq defaults) results in this error being printed in the DBManager window:

Error:
database "" does not exist

Query:
SELECT has_database_privilege('', 'CREATE'), 
       has_database_privilege('', 'TEMP')

Assuming the query is sent to the connected database, the bug would be fixed by changing the query to:

SELECT has_database_privilege(current_database(), 'CREATE'), 
       has_database_privilege(current_database(), 'TEMP');

History

#1 Updated by Giovanni Manghi about 11 years ago

  • Target version set to Future Release - High Priority

#2 Updated by Paolo Cavallini over 10 years ago

  • Assignee deleted (Giuseppe Sucameli)

#3 Updated by Sandro Santilli over 10 years ago

  • Assignee set to Sandro Santilli

Fixed with 39b3e5fa102a3d61a360aa94dd10394f53491b00 in master
Is 2.4 coming out from master or does it have another branch ?

#4 Updated by Nathan Woodrow over 10 years ago

Out of master.

#5 Updated by Nathan Woodrow over 10 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

#6 Updated by Sandro Santilli over 10 years ago

Sorry, I meant to ask about 2.3, not 2.4 -- is that also coming out of master ?
Also, I've this backported to 2.2, can I push ?

#7 Updated by Nathan Woodrow over 10 years ago

2.3 == 2.4

Also available in: Atom PDF