On 31/10/18 15:56, Rich Shepard wrote:
On Wed, 31 Oct 2018, Moritz Lennert wrote:
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,
Thank you. I use hyphens in multi-word file names while applications such
as grass and R use underscores. When I get them mixed up I have a tendency
to not see the discrepancy which is obvious to others.
Now I need to fix an issue with db.connect. Perhaps others will see what
I'm overlooking.
db.connect -p
driver: pg
database: willamette-river-hg
schema:
group:
Which suggests that grass sees the database. But, when I try to copy a
table from sqlite to pg the application fails to find the database:
The script:
db.connect driver=pg database="willamette-river-hg"
db.login driver=pg database="willamette-river-hg" host='salmo' port=5432 --o
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 result:
$HOME/documents/white-papers/geochemistry/willamette-river-mercury/scripts/grass-to-postgres.sh
WARNING: DB connection <pg/willamette-river-hg> already exists and will be
overwritten
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: Connection refused
Is the server running on host "salmo" (192.168.55.1) and accepting
TCP/IP connections on port 5432?
This sounds like Stefan might be on the right path: are you sure your
Postgresql server accepts connections from the network ? What is
'listen_addresses' set to in your postgresql.conf ? And is password
authentication enabled in pg_hba.conf ?
Moritz
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user