[Monetdb-developers] next val, to be higher than the highest value

Niels Nes Niels.Nes at cwi.nl
Thu Aug 21 08:14:25 CEST 2008

On Thu, Aug 21, 2008 at 03:13:47AM +0200, Stefan de Konink wrote:
> Hello,
> I have run in some unexpected troubles related to the serial datatype. 
> Is it possible to force the next value to be higher than the highest 
> value already present in the sequence?
You can restart your serial/auto_increment or sequence number if you
have a sequence number object name.

To see the sequence numbers

SELECT q.name, s.name, q."start", q."minvalue", q."maxvalue",
q."increment", q.cacheinc, q."cycle"  FROM SEQUENCES q, SCHEMAS s where
s.id = q.schema_id;

example restart


> The behavior I now see is counter intuitive and starts to fill the empty 
> values before this value first.
> Stefan
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers


Niels Nes, Centre for Mathematics and Computer Science (CWI)
Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
room C0.02,  phone ++31 20 592-4098, fax ++31 20 592-4312
url: http://www.cwi.nl/~niels   e-mail: Niels.Nes at cwi.nl

More information about the developers-list mailing list