| From: | Valerio Santinelli <tanis(at)mediacom(dot)it> |
|---|---|
| To: | "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org> |
| Subject: | How to increment by hand a sequence number. |
| Date: | 1999-01-18 15:31:30 |
| Message-ID: | 36A353D1.30C9878C@mediacom.it |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I've exported a table from an existing MSAccess database to my
PostgreSQL db.
I use a serial ID on the table and now I'm getting errors when I add a
new entry in the table if i don't specify the ID by hand (which should
be placed automatically by the db since it's a serial).
The exact error is this one:
Cannot insert a duplicate key into a unique index.
I think I should set the "last_value" field in the sequence to my real
last value aon the ID field of the table, but Idon't know how to do it.
Is there anybody who can help me ?
Thanks
Valerio Santinelli
tanis(at)mediacom(dot)it
| From | Date | Subject | |
|---|---|---|---|
| Next Message | advance | 1999-01-18 15:48:52 | Re: [GENERAL] How to increment by hand a sequence number. |
| Previous Message | Bruno Durrenberger | 1999-01-18 15:27:13 |