title: Operator does not exist: character varying =?, postgres JDBC placeholder not working
body: <p>Having a problem with this method. Suppose to return questions from a db where a chapter number dictates which questions to return.</p>
  <p>It's returning :</p>
  <p>ERROR: operator does not exist: character varying =?
  Hint: No operator matches the given name and argument type. You might need to add an explicit type cast.</p>
  <p>Have Tried casting but nothing was working. Seems that it is taking the placeholder '?' as a literal value even though it isn't in double quotes.</p>
  <p>Parameter is being passed from frontend but throwing back an Error:500 Internal Server Error i guess because of the 'operator not existing'.</p>
  <p>Not sure where to go from here so any help is appreciated.</p>
  <p>p.s. The parameter passed was an Integer before but again was asking me to cast it with no luck so changed to String and changed the Db column datatype to VARCHAR from smallint to try and get some sort of data type compatibility but nothing as of yet.  Perhaps casting is the fix but not sure how to get it right myself.</p>
  <pre><code>public List&lt;Question&gt; selectQuestionsByChapterNumber(String chapternumber) {
      final String sql= &quot;SELECT question FROM chapter_questions WHERE chapternumber=?&quot;;
      return jdbcTemplate.query(sql, (resultSet,i) -&gt;{
          return new Question(
                  resultSet.getInt(&quot;id&quot;),
                  resultSet.getString(&quot;chapternumber&quot;),
                  resultSet.getString(&quot;question&quot;),
                  resultSet.getString(&quot;answer&quot;));
      });
      }
  </code></pre>