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

Reply via email to