On 30/10/18 22:37, Rich Shepard wrote:
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=#

You database seems to be called 'willamette-river-hg', i.e. all hyphens, whereas you are trying to db.copy to 'willamette_river_hg', i.e. one hyphen, one underscore.

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to