Question: The past 3 days I've tried to get this simple example to work but whatever I try I just can't seem to understand where I'm going wrong...

HTML:

```
<input type="text" id="textEntry" /> <button>Go</button>
<ul id="list">
    <li>Text from the input field will appear below</li>
</ul>

```

jQUERY:

```
$('button').click(function() {
    $enteredText = $('#textEntry').val();

    if($enteredText.length === 0) {
        alert('PLace an item in the field box');
    } else {        
        $newListItem = $('<li/>').html($enteredText).appendTo('#list');
    }

});

$('li').live('mouseover mouseout', function(event) {
    if(event.type == mouseover) {
        $(this).css('background-color', 'yellow');
    } else {
        $(this).css('backgorund-color', 'transparent'); }
});

```

Ultimately what I'm looking to do is have a user input an item into the text field which would then append itself to the existing list (this works - no issues). The user can then hover over a specific entry causing the background to turn yellow on mouseover and transparent on mouseout (the issue).

Any help would be swell. 

Thanks.

Answer: 
If the schema contains serial or sequence columns, you should reset these to the max value that occurs in the corresponding column. (normally you should not import the serials from a file, but give them the freedom to autoincrement.)

For all imported tables you should identify the sequence fields and run the following code on them. (substitute your schema name for "sch", your table name for "mytable" and your id column name for "id") 

```
WITH mx AS ( SELECT MAX(id) AS id FROM sch.mytable)
SELECT setval('sch.mytable_id_seq', mx.id) AS curseq
FROM mx
        ;

```
Another way is remove the primary key (id) from the columns (or don't dump the id). So your data would look like 

```
INSERT INTO book (name, price) VALUES ('Alchemist' , 10);

```

instead of 

```
INSERT INTO book (id, name, price) VALUES (1 , 'Alchemist' , 10);

```

This way, you won't have to reset the primary key after loading initial data