Re: running psql in a cron job

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: running psql in a cron job
Дата
Msg-id 20020807185409.GB9661@rice.edu
обсуждение исходный текст
Ответ на Re: running psql in a cron job  (Ignacio Coloma <icoloma-lists@iverdino.com>)
Список 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 по дате отправления:

Предыдущее
От: "Tom Haddon"
Дата:
Сообщение: Re: ALTER TABLE follow up
Следующее
От: Gregory Brauer
Дата:
Сообщение: Altering live databases