Bug report #3489
Missing DB name in Add PostGis layer gives no useful warning
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 13549 |
Description
When creating a new connection to a PostGis DB, if the DB name is left empty the user is given the following messages:
Database connection was successful, but the accessible tables could not be determined.
and then
Database connection was successful, but no accessible tables were found. Please verify that you have SELECT privilege on a table carrying [[PostGIS]] geometry.
It would be good to mention that a DB name is mandatory.
Associated revisions
db manager: show database name in postgis connection details (fixes #3489)
db manager: show database name in postgis connection details (fixes #3489)
(cherry picked from commit ecf3b3719d4f24dc7f369d3253150c4990c9c681)
History
#1 Updated by Jürgen Fischer over 13 years ago
Replying to mbernasocchi:
It would be good to mention that a DB name is mandatory.
But it isn't - dbname defaults to the username.
#2 Updated by Marco Bernasocchi over 13 years ago
ok, I see, in Postgis manager it is visible on which DB one is working (important foremost in case of a default) but not when simply adding a postgis layer using the gui button.
#3 Updated by Giovanni Manghi almost 13 years ago
- Target version changed from Version 1.7.0 to Version 1.7.4
#4 Updated by Paolo Cavallini over 12 years ago
- Target version changed from Version 1.7.4 to Version 1.8.0
- Crashes QGIS or corrupts data set to No
- Affected QGIS version set to master
#5 Updated by Paolo Cavallini about 12 years ago
- Target version changed from Version 1.8.0 to Version 2.0.0
#6 Updated by Jürgen Fischer over 10 years ago
- Target version changed from Version 2.0.0 to Future Release - Lower Priority
#7 Updated by Médéric RIBREUX almost 9 years ago
- Status changed from Open to Feedback
- Pull Request or Patch supplied set to No
- Operating System changed from Debian to All
- Assignee deleted (
nobody -)
Hello, bug triage...
on QGIS 2.13 master (and probably with previous versions), when you create a connection without a DB name, the connection is made to a DB which has the name of the connected user. You can choose a name for the connection and you can, of course, add the name of the DB in this name (coupled with the username or the role), but this is not mandatory and you can write whatever you want.
In DB Manager (successor of PostGIS Manager), connections are now used instead of DB name. Actually, you can't find the name of the DB in DBManager anymore.
So what do we do with this bug ? Should we:
- Add DB name in the connection dialog box (perhaps inside parenthesis after the name of the connection) ?
- Add DB name in DB Manager inside parenthesis after the name of the connection and/or in a field on the connection details tab ?
- Add both ?
- Do nothing and we close this bug by saying it is user responsibility to correctly name his/her connection (after all, the DB name can be viewed by editing the connection configuration) !
#8 Updated by Sebastian Dietrich almost 9 years ago
- Add DB name in DB Manager
inside parenthesis after the name of the connection and/orin a field on the connection details tab?
- The connection name is a user defined property and if the user finds a need to have the DB name inside it he can just put it there. Probably some users already did so.
- The connection name is meant to be a key to look up a connection. And as such it must not change when a property of the connection it points to changes. This would make it sort of a hash, not a key. All saved projects/layers that contain the old key would break in this case.
- The DB name (and in fact all other fields, too) can be filled by environment variables. So a call to PQconndefaults() is mandatory to fetch the desired information.
#9 Updated by Médéric RIBREUX almost 9 years ago
- Status changed from Feedback to Open
#10 Updated by Giovanni Manghi almost 9 years ago
- Operating System deleted (
All) - Status info deleted (
0)
#11 Updated by Jürgen Fischer over 8 years ago
- Status changed from Open to Closed
Fixed in changeset ecf3b3719d4f24dc7f369d3253150c4990c9c681.