| From: | Walter Willmertinger <willmis(at)gmail(dot)com> |
|---|---|
| To: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: psql shell with no password prompt |
| Date: | 2010-07-27 21:56:22 |
| Message-ID: | AANLkTimDps=wYgQE=Ds8cCmYcnf51mUqaiv32DM-qBAD@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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(dot)Toutant(at)inspq(dot)qc(dot)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
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Irene Barg | 2010-07-27 21:58:46 | Re: postgresql-server-8.4.4-1PGDG.el5 - ERROR: could not write block 503414 of temporary file: No space le,ft on device |
| Previous Message | Kevin Grittner | 2010-07-27 20:49:54 | Re: postgresql basic info |