Re: Serial/sequence problem

From: Michael Hall <mick(at)mjhall(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Serial/sequence problem
Date: 2008-11-25 08:09:49
Message-ID: 20081125080949.GA6426@server1.jarvisstreet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> The 3636 INSERT-Statements contains a fix value for the ID-Column,
> right? Thats wrong, omit the id-column and value or use simply 'default' for it.

That's right. I thought that might be the case.

> > - how can I rectify the situation?

> Set the sequence to the new value, 3636+9, via
> setval('your_sequence', 3636+9)

I'll re-import the data with DEFAULT in the id (SERIAL) column, hopefully new inserts will be OK then and I can leave the sequence alone?

Thanks

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Bog 2008-11-25 08:44:34 Re: Place of subselect
Previous Message A. Kretschmer 2008-11-25 07:56:25 Re: Place of subselect