Skip site navigation (1) Skip section navigation (2)

psql : password on Win32

From: "Fabio D'Ovidio" <dovidio(at)planetek(dot)it>
To: pgsql-general(at)postgresql(dot)org
Cc: tragni(at)planetek(dot)it
Subject: psql : password on Win32
Date: 2007-02-26 18:34:25
Message-ID: 45E33641.17035.139CDF@dovidio.planetek.it (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Hi folks !
I am new of the list even if I use PostgreSQL\PostGIS since I was in Planetek to work.

I have a problem with psql  command line on Windows XP. I want to set password for the 
user postgres in order to execute an sql script directly from a batch file without entering 
password from the prompt.

The command is :

psql -U postgres -d mydb -f script.sql

I have used pgpass.conf file with the syntax :

localhost:5432:mydb:postgres:password

and it doesn't work.

How can i do ?

Thanks!

--
Fabio D'Ovidio

Web GIS Staff 
Planetek Italia s.r.l.
Via Massaua 12, I-70123 Bari 
Tel.: +39 080 5343750 Fax: +39 080 5340280 
dovidio(at)planetek(dot)it - http://www.planetek.it 
--




Responses

pgsql-novice by date

Next:From: Andrej Ricnik-BayDate: 2007-02-26 19:10:25
Subject: Re: [GENERAL] psql : password on Win32
Previous:From: Tom LaneDate: 2007-02-26 17:51:33
Subject: Re: postgresql-server-8.2.3-1mdv2007.1.i586.rpm installation problem

pgsql-general by date

Next:From: Alvaro HerreraDate: 2007-02-26 18:44:30
Subject: Re: Composite Keys
Previous:From: Anton MelserDate: 2007-02-26 18:24:57
Subject: stored procedure optimisation...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group