Skip site navigation (1) Skip section navigation (2)

Re: Sequence bug

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: PgAdmin Hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Sequence bug
Date: 2004-10-21 13:54:21
Message-ID: 4177BF8D.4010309@pse-consulting.de (view raw or flat)
Thread:
Lists: pgadmin-hackers
Dave Page wrote:

> 
> Hmm, it works OK (thanks), but not as you would expect. With setval's
> third arg = false, you can set the sequence value to 1, which is
> displayed as expected as the 'Current Value', but then a 'SELECT
> nextval()' also returns 1 which is not what you would expect (especially
> if you are not the same user, or you forgot what you did earlier).

But this is consistent with ALTER SEQUENCE ... RESTART ...; I just checked.

> Maybe it's better not to try to allow resetting to 0 with 7,3?

Why not? 0 sounds like a legal int value to me...

Regards,
Andreas

In response to

pgadmin-hackers by date

Next:From: Dave PageDate: 2004-10-21 14:15:57
Subject: Re: Sequence bug
Previous:From: Dave PageDate: 2004-10-21 13:39:35
Subject: Re: Sequence bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group