adding multithreaded postgres script for copyediting