[GRASS-user] Migrating to new RDBMS
Rich Shepard
rshepard at appl-ecosys.com
Wed Oct 31 06:40:56 PDT 2018
On Wed, 31 Oct 2018, Markus Metz wrote:
> 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,
Here ~/.pgpass contains host, port, *, and username. Anyway, I changed
that line in the script:
db.login driver=pg database="willamette_river_hg" host='salmo' port=5432
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
The results did not change:
> $HOME/documents/white-papers/geochemistry/willamette-river-mercury/scripts/grass-to-postgres.sh
ERROR: DB connection <pg/willamette_river_hg> already exists. Re-run
'db.login' with '--overwrite' flag to overwrite existing settings.
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
I think that I've now tried every variation of options with db.login and
db.connect (which works at the grass shell prompt) with the most current
releases of 7.7.svn and I'm stymied.
Thanks,
Rich
More information about the grass-user
mailing list