title: Compare field with value and return bool
body: <p>I'm trying move hash cheking from server app to PostgreSQL.
  In other words I'm need calling a query to PGSQL, which compare string from query with string from field and return result of equal comparison as bool, but I don't know how do this without procedures on clear SQL.</p>
  
  <p>upd: I have table <strong>users</strong> with field <strong>password</strong>(currently <em>text</em>, in the future - <em>bytea</em>). I want write sometihng like </p>
  
  <pre><code>select * from values ('WrittenPassword' = users.password) where username = 'someuser' ,
  </code></pre>
  
  <p><strong>which must return true or false as result of equal comparison</strong>.</p>