title: How to handle single quotes in Postgresql query
body: <p>When I am trying to find all records in <code>details</code> table which have <code>Linux</code> present in the array column <code>operating_systems</code>.</p>
  
  <p>Query <code>select * from details where 'Linux' = ANY(operating_systems);</code> works perfectly and returns all records which have <code>Linux</code> in <code>operating_systems</code> column.</p>
  
  <p>But if I want to get all records where <code>I don't know</code> is present in <code>operating_systems</code> I am unable to form a correct query.</p>
  
  <p>Query <code>select * from details where 'I don\'t know' = ANY(operating_systems);</code> does not escape single quotes and takes it literally, resulting in an incomplete query.</p>