[Qgis-developer] nextval not updated?

Jürgen E. Fischer jef at norbit.de
Sat Nov 1 12:40:24 EDT 2008


Hi Paolo,

On Sat, 01. Nov 2008 at 11:25:46 +0100, Paolo Cavallini wrote:
> With a freshly compiled qgis I'm getting into trouble adding postgis
> records: apparently the sequence is not updated, so the commit fails.
> Is this a regression?

I'd say it's the other way round.  It wasn't updated before and is now.
So the ids retrieved from the not uptodate sequence clash with existing
rows.  So the sequences need to be updated first:

select setval('foo_id_seq', max(id)) from foo;


Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the Qgis-developer mailing list