Fix postgres paramterized query.