Generate auto ID in postgresql
<p>User Table:</p>

<pre><code>    ID  Name
    1   usr1
    2   usr2
    3   usr3
</code></pre>

<p>In the above table, ID is a primary key. My requirement is while inserting data into the table, I would like to specify only the 
name like <code>INSERT INTO user VALUES('usr4')</code>. After execute the query, Is there any way to automatically create ID for 'usr4'?</p>

<p>I tried with serial data type. For that also we have to specify the keyword default like <code>INSERT INTO user VALUES(default,'usr4')</code>. So, is there any way to do like <code>INSERT INTO user VALUES('usr4')</code>. NOTE: ID should be unique. </p>