title: PostgreSQL: Add Interval to Timestamp from column value
body: <p>I need to add minutes coming from an integer column with a timestamp to compare to another column.</p>
  
  <p>Here's an example:
  </p>
  
  <pre><code> SELECT t1.id_liame, t1.id_table, t1.periodicidade , t3.data_extracao, 
      CASE WHEN(NOW() &lt; (e.data_extracao + INTERVAL t1.periodicidade || '
      MINUTES')) 
      THEN 'yes' ELSE 'no' END
      FROM table1 as t1 LEFT JOIN liame_has_extracao as t2 USING(id_liame)
      LEFT JOIN extracao as t3 USING(id_extracao)
  </code></pre>
  
  <p><code>l.periodicidade</code> is integer (minutes)<br/>
  I need to verify if <code>data_extracao(timestamp)</code> is greater then <code>NOW() + l.periodicidade(integer - minutes)</code>.</p>
  
  <p>How can i do it?</p>