Re: psql shell with no password prompt - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: psql shell with no password prompt
Date
Msg-id AANLkTi=ek7q=9Vw4xbhCDKJB6335ni__hdhTCNE4+z4v@mail.gmail.com
Whole thread Raw
In response to Re: psql shell with no password prompt  (Walter Willmertinger <willmis@gmail.com>)
Responses Re: psql shell with no password prompt  (Walter Willmertinger <willmis@gmail.com>)
List pgsql-admin
However, those are deprecated, and the .pgpass is considered the
preferred method.

On Tue, Jul 27, 2010 at 3:56 PM, Walter Willmertinger <willmis@gmail.com> wrote:
> You can set user and password with environment variables (PGUSER and
> PGPASSWORD) , also in a Windows batch or program.
> SET PGPASSWORD=xxxyyyzzz
> psql -U "dbadmin" -d mydb -f D:\script.sql
>
>
>
> Regards
>
> Walter
>
>
> On Tue, Jul 27, 2010 at 6:53 PM, <Steve.Toutant@inspq.qc.ca> wrote:
>>
>> Hi,
>> I created several SQL that are automatically executed via windows task
>> scheduler, here is an example
>> psql -U "dbadmin" -d mydb -f D:\script.sql
>>
>> It was running well until I changed the user (to open a session)
>> associated to these task.
>> The script prompt for a password for user dbadmin.
>>
>> How to avoid that? I guess there is a config so dbadmin will "trust" this
>> new user....
>>
>> Thanks for your help,
>>
>> Steve
>



--
To understand recursion, one must first understand recursion.

pgsql-admin by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: pl/PHP build on PostgreSQL v9 beta?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Postgresql for Windows 7