Bug report #1173
db grass modules
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11233|
To connect to a pg database, the user apparently must:
- run db.connect(.schema) giving:
Driver name (pg)
"host=faunalia.it,dbname=database_name" (with comma and maybe quotes)
- run db.login giving
host=faunalia.it dbname=prova_leo (with space, no comma, no quotes)
This seems a bit more complicated than necessary. I suggest:
- to have consistent syntax
- to put each variable in a different space, separating host and db_name
- to merge the two modules into one, so user must enter Driver name,
host, dbname only once.
If you look at:
everything looks more simple:
db.connect driver=pg database="host=myserver.itc.it,dbname=mydb"
db.login user=myname [pass=secret]
#2 Updated by Paolo Cavallini over 12 years ago
The idea is having in the same window both connection parameters and
login credentials. The current situation is quite confusing.
Is it is possible to have two different grass commands in the same module?
Also, I do not understand why having both db.connect and db.connect.schema (the second is == to the first, with just one extra option).
#6 Updated by Paolo Cavallini over 12 years ago
Cannot start module qgis.db.connect-login.pg.py
command: /usr/share/qgis/grass/scripts//qgis.db.connect-login.pg.py --interface-description
Traceback (most recent call last): File "/usr/share/qgis/grass/scripts//qgis.db.connect-login.pg.py", line 75, in import grass ImportError: No module named grass