From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Ignacio Coloma <icoloma-lists(at)iverdino(dot)com> |
Cc: | Wei Weng <wweng(at)kencast(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: running psql in a cron job |
Date: | 2002-08-07 18:54:09 |
Message-ID: | 20020807185409.GB9661@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Wed, Aug 07, 2002 at 06:02:39PM +0000, Ignacio Coloma wrote:
> Maybe I'm a bit lost: if cron is executed as root, then su <user> -c
> 'command' would work without providing the password?
>
> I mean, putting the password plain text anywhere doesn't seem that nice
> idea imho
It's not the unix 'postgres' user's password: it's the database password
for the DB user - a completely independent user/password pair.
Ross
>
> Wei Weng wrote:
>
> >never mind. a quick search in the mailing list archive solved the
> >problem. :)
> >
> >Just use PGPASSWORD=my_pass psql -c "VACUUM ANALYZE" -d my_data -U
> >my_user
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Brauer | 2002-08-07 21:45:49 | Altering live databases |
Previous Message | John Brothers | 2002-08-07 18:39:40 | getting oid of an INSERT automatically |