title: postgreSQL: how to duplicate a row
body: <p>This is the scheme of my table web_book:</p>
  
  <pre><code>     Column     |          Type          |                       Modifiers                       
  ----------------+------------------------+-------------------------------------------------------
   id             | integer                | not null default nextval('web_book_id_seq'::regclass)
   page_count     | integer                | not null
   year_published | integer                | not null
   file           | character varying(100) | not null
   image          | character varying(100) | not null
   display_on_hp  | boolean                | not null
   name           | character varying(128) | not null
   description    | text                   | not null
   name_cs        | character varying(128) | 
   name_en        | character varying(128) | 
   description_cs | text                   | 
   description_en | text                   |
  </code></pre>
  
  <p>The table contains one row with <code>id=3</code>. I want to duplicate the row but If I try this:</p>
  
  <pre><code>INSERT INTO web_book SELECT * FROM web_book WHERE id=3;
  </code></pre>
  
  <p>I get this: </p>
  
  <pre><code>ERROR:  duplicate key value violates unique constraint "web_book_pkey"
  DETAIL:  Key (id)=(3) already exists
  </code></pre>