Re: psql shell with no password prompt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux