title: PostgreSQL next value of the sequences?
body: <p>I am using PostgreSQL for my Codeigniter website. I am using grocery crud for add, edit and delete operations. While doing an edit or add, I want to rename an uploaded file dynamically based on the id of the content. I am able to do this using grocery crud's <code>callback_after_upload</code> function. </p>
  
  <p>I want a next id of the content while adding a new content. I tried to use <code>nextval()</code> function, but sequence gets incremented with it. How can get the last value of the sequence without using <code>nextval()</code> function?</p>
  
  <p>Or is there a simple way I can do this?</p>