[GRASS-user] v.in.db command using PostgreSQL database

ante_anzulovic ante_anzulovic at net.hr
Fri May 25 04:08:53 EDT 2007


I'm having a problem with extracting vector data from my PostgreSQL database.
using native WinGRASS and also GRASS 6.2.1 installed on Cygwin, on both versions I get same results

this is the set of commands that works fine:

>db.connect driver=pg database="host=localhost,dbname=projekt"
>db.login user=zmija pass=********
>db.connect -p

So, now I have a valid connection to my database, GRASSecognizes it, and I checked with other
commands (db.columns, db.tables).

I have to extract vector data from database, but after using the command:

> v.in.db driver=pg database="host=localhost, dbname=projekt" 
table=public.teren x=xorig y=yorig z=zorig key=ID out=teren2 --overwrite

WARNING: The vector 'teren2' already exists and will be overwritten.
DBMI-Postgres driver error:
Cannot connect to Postgres: fe_sendauth: no password supplied

WARNING: Cannot open database 'host=localhost, dbname=projekt' ERROR: Cannot open database
<host=localhost,dbname=projekt> by driver <pg>

the driver couldn't be bad because it's used for connecting to database, and that works
how can I supply a password to v.in.db if it requires it, and I already did db.login, result being:
WARNING: The password was stored in file

please help...


Iskon.DUO - vrtoglavo brz ADSL do 10 Mbps u paketu s telefonom za 99 kn/mj.
Saznajte vise na www.iskon.hr ili putem telefona 0800 1000.

More information about the grass-user mailing list