[GRASS-user] Migrating to new RDBMS

Rich Shepard rshepard at appl-ecosys.com
Tue Oct 30 14:37:05 PDT 2018


On Tue, 30 Oct 2018, Rich Shepard wrote:

> I was thinking of working within grass rather than at the bash prompt.
> You're right: I know the difference between double and single quotes but
> blew it on this instance.

   I'm still missing something.

   From the grass shell the command, db.connect driver=pg
database=willamette_river_hg, apparently completes because there's no
warning or error displayed.

   However, the db.copy command still cannot find the database:

GRASS 7.7.svn (willamette_basin):~/data/grassdata/willamette_basin > 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

   I access the database with psql from the bash prompt with no issues:

$ psql willamette-river-hg 
psql (10.3)
Type "help" for help.

willamette-river-hg=#

   Germane to quotation marks, the examples on the db.copy page use both,
sometimes in the same example.

Regards,

Rich


More information about the grass-user mailing list