Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> writes:
> Ganesan Kanavathy wrote:
>> The problem I am facing is the when running the cronjob it is asking
>> for password.
> Just add:
> export PGPASSWORD=mypassword
> to your script.
A much better solution (assuming you are using a reasonably recent PG
release) is to put the needed password in ~/.pgpass, which can be set to
0600 permissions. PGPASSWORD is insecure on many platforms because
other people can see your environment variables.
regards, tom lane