From the psycopg docs: the variables placeholder must always be a %s, even if a different placeholder (such as a %d for integers or %f for floats) may look more appropriate