connecting in shell scripts ??

Поиск
Список
Период
Сортировка
От Anand Raman
Тема connecting in shell scripts ??
Дата
Msg-id 000701c0767b$ef8e28a0$9b8cc3cb@anand
обсуждение исходный текст
Ответы Re: connecting in shell scripts ??
Список pgsql-general
hi guys
I wish to connect to the database thru a cron job and do some sql queries,,
However i am having problems in connecting to the database thru the shell
script.. I am unable to pass the password..
I have been trying to do the following

#! /bin/sh
psql -h localhost db1 -U foo -c "select current_timestamp" < passwdfile
where passwdfile has the passwd for the connection

This isnt working.. I am a little confused for the same thing worked for
pg_dump..

Looking forward for ur suggestions..
I am on 7.0.3

Thanx
Anand Raman


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: 7.0.3 rpm testing & other problems
Следующее
От: "Anand Raman"
Дата:
Сообщение: \connect