View Single Post
  #10  
Old 11-28-2007, 06:31 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: Running Postgres from an AHK script -- Help?

excellect [img]/images/graemlins/smile.gif[/img]

Actually, I don't think you can set the password in the script [img]/images/graemlins/frown.gif[/img] I didn't make provisions for it, because a) usually the "postgres" user doesn't need one - and b) it is not advised by the postgres documentation.

I think the recommended method is to use a PG_PASS environment variable... wait one sec. while I dig up the link...

EDIT: PG_PASS is wrong (or for unix) I think. Windows wants a pgpass.conf file created somewhere... but I never did that.

All I did was to edit the pg_hba.conf file, and change the access mode for localhost connections from md5 to trust - this cuts the need for a password. Maybe not the most secure method... but if they can access localhost they can find pgpass.conf, right?
Reply With Quote