[GRASS-user] Migrating to new RDBMS

Markus Metz markus.metz.giswork at gmail.com
Wed Oct 31 00:51:17 PDT 2018


On Tue, Oct 30, 2018 at 10:54 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
>
> On Tue, 30 Oct 2018, Markus Metz wrote:
>
> > db.connect only sets the default database, it does not test if it exists
> > or is accessible. For PG, you need to use db.login first in order to
> > actually use the PG database.
>
> Markus M,
>
>    Sigh. Neither without or with a username it still fails:
>
> > db.login driver=pg database="willamette_river_hg" user=rshepard --o

try to set host and port with db.login. Username and password are not
required if a ~/.pgpass file exists. See the manual of db.login, following
the link to PostgreSQL that describes the GRASS PG driver.

Markus M

> WARNING: DB connection <pg/willamette_river_hg> already exists and will be
>           overwritten
> > db.copy from_driver=sqlite
from_database="$HOME/data/grassdata/willamette_basin/mercury/sqlite/sqlite.db"
from_table=all_species to_driver=pg to_database="willamette_river_hg"
to_table=all_species.pg
> DBMI-PostgreSQL driver error:
> Connection failed.
> FATAL:  database "willamette_river_hg" does not exist
>
> DBMI-PostgreSQL driver error:
> Connection failed.
> FATAL:  database "willamette_river_hg" does not exist
>
> WARNING: Unable to open database <willamette_river_hg> by driver <pg>
> no database is open
> no database is open
> WARNING: Copy table failed
>
> Thanks,
>
> Rich
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181031/c0e82dbf/attachment.html>


More information about the grass-user mailing list