title: How to query UUID for postgres
body: <p>I'd like to use UUID as an identifier, provide the first 8 digits to find out if it exists in the database. </p>
  
  <p>normally I can do this without a problem:</p>
  
  <p><code>select * from TABLE where id = 'e99aec55-9e32-4c84-aed2-4a0251584941'::uuid</code></p>
  
  <p>but this gives me error:</p>
  
  <p><code>select * from TABLE where id LIKE 'e99aec55%@'::uuid</code></p>
  
  <p>error: </p>
  
  <pre><code>ERROR:  invalid input syntax for uuid: "e99aec55%@"
  LINE 1: select * from TABLE where id LIKE 'e99aec55...
                                                ^
  Query failed
  PostgreSQL said: invalid input syntax for uuid: "e99aec55%@"
  </code></pre>
  
  <p>Is there a way to query first n digits for a UUID type in postgresql? </p>