hi all,
i am trying to create a database backup and restore windows batch file,
which when run will do a database table backup and a corresponding
table restore.

now for table_usernames backup i run something like from the command
prompt,
pg_dump.exe -i -h localhost -p 5432 -U postgres -F t -v -f
"C:\usernames.backup" -t table_usernames "loginDetails"
now for db restore i run something like from the command prompt,
pg_restore.exe -i -h localhost -p 5432 -U postgres -d "loginDetails" -a
-t table_usernames -v "C:\usernames.backup"

the problem is that after i do a backup i need to delete the table
content and then do a restore. through pgadmin i would do DELETE FROM
table_usernames. however i need to do this from the command prompt,
like how i am doing above.

it seems very obvious and simple, but i am unable to think of how i
would do deletion of a table from the command prompt

thanks for all feedback and help.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to