I\'m working with Go and PostgreSQL (pq driver), I have the following query
SELECT p.id, p.name, p.description, p.price, p.image, p.rate FROM products AS p W
You need to put the like pattern in single quotes:
like
SELECT p.id, p.name, p.description, p.price, p.image, p.rate FROM products AS p WHERE LOWER(p.name) LIKE '%' || $1 || '%' ORDER BY p.rate DESC;