Re: running psql in a cron job

Поиск
Список
Период
Сортировка
От Ignacio Coloma
Тема Re: running psql in a cron job
Дата
Msg-id 3D5160BF.2040804@iverdino.com
обсуждение исходный текст
Ответ на running psql in a cron job  (Wei Weng <wweng@kencast.com>)
Ответы Re: running psql in a cron job  (Wei Weng <wweng@kencast.com>)
Re: running psql in a cron job  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-sql
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

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
>
>
>On Wed, 2002-08-07 at 10:51, Wei Weng wrote:
>  
>
>>My database has "local all password" as its HBA control.
>>
>>Is there anyway to manipulate psql so that I can somehow put the
>>password also inside the command line so that I can run psql in a cron
>>job? (such as psql -c "VACUUM ANALYZE" -d my_data -U my_user)
>>
>>Thanks
>>
>>-- 
>>Wei Weng
>>Network Software Engineer
>>KenCast Inc.
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
>>
>>    
>>




В списке pgsql-sql по дате отправления:

Предыдущее
От: Wei Weng
Дата:
Сообщение: Re: running psql in a cron job
Следующее
От: Wei Weng
Дата:
Сообщение: Re: running psql in a cron job