working merge and load postgres script