Postgres data types integer and boolean
<p>I have a sql table (version 9.3 PostgreSQL) with fields (tour character varying, tourtime int)... I want to write a query like <code>case when tour = 'A' then tourtime = 2 when tour = 'B' then tourtime = 3 else 0</code> etc.. </p>

<p>However i get the error</p>

<blockquote>
  <p>CASE types integer and boolean cannot be matched</p>
</blockquote>

<p>Why is this?</p>