[GRASS-dev] G70: Link to PG database issue (wxGUI)
Martin Landa
landa.martin at gmail.com
Sun May 25 10:57:12 PDT 2014
Hi,
2014-05-25 12:24 GMT+02:00 Markus Neteler <neteler at osgeo.org>:
[...]
> While this is now working also here, in terms of the original issue I
> wonder if it is needed to switch the DB settings for the mapset when
> "only" trying to link to one PostGIS vector map (so a kind of mixed
> use).
running `db.login` doesn't mean that you switch DB settings. It just
allows you to defined user/password for given driver, nothing else.
$ db.connect -p
driver: sqlite
database: /opt/grassdata/gis1-sjtsk/g6/sqlite/sqlite.db
$ db.databases dri=pg
DBMI-PostgreSQL driver error:
Unable to connect to Postgres:
fe_sendauth: no password supplied
DBMI-PostgreSQL driver error:
Unable to connect to Postgres:
fe_sendauth: no password supplied
ERROR: Unable to list databases. Try to define correct connection
settings by db.login.
OK, something is missing.
$ db.login dri=pg user=xxx passwd=yyy
$ db.databases dri=pg
template1
template0
Default DB settings untouched...
$ db.connect -p
driver: sqlite
database: /opt/grassdata/gis1-sjtsk/g6/sqlite/sqlite.db
schema:
group:
Martin
--
Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
More information about the grass-dev
mailing list