Off the top of my head:
psql -c "select into dump_table from old_table ;" database
pg_dump -t dump_table -f dump_table.tmp database
sed -e "s/dump_table/table_name/g" dump_table.tmp >table_name.sql
rm dump_table.tmp
You should now have a file called table_name.sql with the stuff
requir
how to save sql result to a text file in database-backup format?
I want to backup a portion of data from my query to files and can do restore
from them.
Thanks
William
___
Sent by ePrompter, the premier email notification software.
Free do