Fixed error in postgres script