Trying to parameterize my SQL queries (using libpq function PQexecParams), I was stuck on a syntax error:
SELECT date $1
The error is:
The solution is to use a type cast instead of date:
date
SELECT $1::date