Re: [GENERAL] psql : password on Win32

Lists: pgsql-generalpgsql-novice
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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-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
--


From: "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com>
To: dovidio(at)planetek(dot)it, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [GENERAL] psql : password on Win32
Date: 2007-02-26 19:10:25
Message-ID: b35603930702261110m72e903dfmac9d87b614d7446d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

What does your pg_hba.conf look like?


From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: psql : password on Win32
Date: 2007-02-26 19:20:05
Message-ID: 20070226192005.GB5354@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-novice

am Mon, dem 26.02.2007, um 19:34:25 +0100 mailte Fabio D'Ovidio folgendes:
> I have used pgpass.conf file with the syntax :
>
> localhost:5432:mydb:postgres:password
>
> and it doesn't work.

Wrong syntax. Change ':' to '\t' or other whitespace.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net