title: Postgresql Sequence vs Serial
body: <p>I was wondering when it is better to choose sequence, and when it is better
  to use serial.</p>
  
  <p>What I want is returning last value after insert using</p>
  
  <pre><code>SELECT LASTVAL();
  </code></pre>
  
  <p>I read this question
  <a href="https://stackoverflow.com/questions/787722/postgresql-autoincrement">PostgreSQL Autoincrement</a></p>
  
  <p>I never use serial before.</p>