title: Postgres manually alter sequence
body: <p>I'm trying to set a sequence to a specific value.</p>
  <pre><code>SELECT setval('payments_id_seq'), 21, true;
  </code></pre>
  <p>This gives an error:</p>
  <blockquote>
  <p><code>ERROR:  function setval(unknown) does not exist</code></p>
  </blockquote>
  <p>Using <code>ALTER SEQUENCE</code> doesn't seem to work either?</p>
  <pre><code>ALTER SEQUENCE payments_id_seq LASTVALUE 22;
  </code></pre>
  <p>How can this be done?</p>
  <p>Ref: <a href="https://www.postgresql.org/docs/current/functions-sequence.html" rel="nofollow noreferrer">https://www.postgresql.org/docs/current/functions-sequence.html</a></p>