title: Bit masking in Postgres
body: <p>I have this query</p>
  
  <pre><code>SELECT * FROM "functions" WHERE (models_mask &amp; 1 &gt; 0)
  </code></pre>
  
  <p>and the I get the following error:</p>
  
  <blockquote>
    <p>PGError: ERROR:  operator does not exist: character varying &amp; integer<br>
    HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.</p>
  </blockquote>
  
  <p>The models_mask is an integer in the database. How can I fix this.</p>
  
  <p>Thank you!</p>