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?
|