Fixed PostgreSQL query by using text parameters