[winGRASS] v.in.db command using PostgreSQL database

Moritz Lennert mlennert at club.worldonline.be
Thu May 24 07:27:58 EDT 2007


On 24/05/07 12:26, ante_anzulovic wrote:
> Hi,
> 
> I'm having a problem with extracting vector data from my PostgreSQL database.
> 
> this is the set of commands that work fine:
> 
>> db.connect driver=pg database="host=localhost,dbname=projekt"
>> db.login user=zmija pass=********
>> db.connect -p
> driver:pg
> database:host=localhost,dbname=projekt
> schema:(null)
> group:(null)
> 
> So, now I have a valid connection to my database, GRASS recognizes 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?


try db.login.

For the future: when you report a problem, please indicate which version 
of GRASS you are using on which platform.

Moritz




More information about the grass-windows mailing list