postgresql: select all db table for deletion