title: Similarity function in Postgres with pg_trgm
body: <p>I'm trying to use the similarity function in Postgres to do some fuzzy text matching, however whenever I try to use it I get the error:</p>
  
  <pre><code>function similarity(character varying, unknown) does not exist
  </code></pre>
  
  <p>If I add explicit casts to text I get the error:</p>
  
  <pre><code>function similarity(text, text) does not exist
  </code></pre>
  
  <p>My query is:</p>
  
  <pre><code>SELECT (similarity("table"."field"::text, %s::text)) AS "similarity", "table".* FROM "table" WHERE similarity &gt; .5 ORDER BY "similarity" DESC LIMIT 10
  </code></pre>
  
  <p>Do I need to do something to initalize pg_trgm?</p>