title: JDBC how to insert record in auto-increment field
body: <p>I'm using Postgresql and Mysql's auto-increment equivalent SERIAL. My table structure looks like:</p>
  
  <pre><code>id | name | description
  </code></pre>
  
  <p>How do I insert new record working with result set (actualy CachedRowSet but it's similar)? I tried this:</p>
  
  <pre><code>rs.moveToInsertRow();
  rs.updateString("name", "x");
  rs.updateString("description", "xxx");
  rs.insertRow();
  rs.moveToCurrentRow();
  </code></pre>
  
  <p>but it doesn't work. I get an execption. It's because I didn't specified the id column value. But how can I specify it? Isn't there any option to make JDBC automaticly insert it? Or some way to retrieve generated keys before inserting the record?</p>