fix postgres syntax