August 28th, 2002, 01:31 AM
Command to remove feedback, echo ??
When I execute the following query, I get ...
... Now, is there any option to remove the heading and feedback, so as to display ...
pg_dump hris > hris28AUG20021128
... alone ?? The reason for this being, I want to spool this to a file to execute that file as a cron job.
Thanks & Regards.
August 28th, 2002, 04:15 AM
Use the -t option to psql. Also use the -c option to have psql run the query and exit immediately. So to use it, like for a cron job, code it like this:
This puts the output into a file called filename.txt.
psql mydb -t -c "select 'pg_dump hris > hris'||name from d_conf_backup" > filename.txt
August 29th, 2002, 12:44 AM
Thanks! That solved it.