Parametrized queries for postgresql