Re: postgres on the comman line

Поиск
Список
Период
Сортировка
Искать
От
Thomas Pundt
Тема
Re: postgres on the comman line
Дата
Msg-id
200509221613.10501.mlists@rp-online.de
Ответ на
postgres on the comman line (Michael Höller)
Список
Дерево обсуждения
postgres on the comman line "Michael Höller" <MichaelHoeller@t-online.de>
Re: postgres on the comman line "A. Kretschmer" <akretschmer@despammed.com>
Re: postgres on the comman line Thomas Pundt <mlists@rp-online.de>
Re: postgres on the comman line Achilleus Mantzios <achill@matrix.gatewaynet.com>
Hi Michael,

On Thursday 22 September 2005 15:55, Michael Höller wrote:
| I like to automate a daily check and like to run select statement via
| cron but this seems to be more tricky than I thought....
|
| I tried the following:
| su postgres -c "select count(*) from TABLE where xxxxxx;"

you mean 
 su - postgres -c "echo 'select count(*) from TABLE where xxxxxx;'|psql"

?

| I have the probelm that I am allways asked for the password - I did not
| find a way how to pass the password.

search the documentation for the .pgpass file. It should contain lines 
with colon separated values consisting of host:port:database:user:password
and must not be world-readable.

| Also I like to direct the result to a file, I assume I can do this via >
| but not haveing passed the first problem I did not check this.

yes.

Ciao,
Thomas

-- 
Thomas Pundt  ---- http://rp-online.de/ ----


В списке pgsql-sql по дате отправления
От: Michael Höller
Дата:
Сообщение: postgres on the comman line
От: A. Kretschmer
Дата:
FAQ