title: How to alter Sequence in PostgreSQL with specific max(id) from a table?
body: <p>I need to get following SQL script syntax right. In postgres, you can't really chain "alter sequence" with "select max(id)". So what's the right way to write script in a way that PostgreSQL accepts it? </p>
  
  <p>Here is the script so you can have an idea what I need:</p>
  
  <pre><code> alter SEQUENCE notification_settings_seq START with (select max(id) from game_user)
  </code></pre>