title: Convert time to seconds in PostgreSQL
body: <p>I have a time value 04:30:25 that I want to convert to seconds. 
  Is there any dedicated function to do this? </p>
  
  <p>I know that we can extract hours, minutes and seconds, then calculate the seconds. </p>
  
  <pre><code>SELECT EXTRACT(hour FROM t)*60*60
         + EXTRACT(minutes FROM t)*60
         + EXTRACT(seconds FROM t)
    FROM test; 
  </code></pre>
  
  <p>But I want some other way...</p>