Re: running psql in a cron job - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: running psql in a cron job
Date
Msg-id 20020807185409.GB9661@rice.edu
Whole thread Raw
In response to Re: running psql in a cron job  (Ignacio Coloma <icoloma-lists@iverdino.com>)
List 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


pgsql-sql by date:

Previous
From: "Tom Haddon"
Date:
Subject: Re: ALTER TABLE follow up
Next
From: Gregory Brauer
Date:
Subject: Altering live databases