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

Re: Sequence bug

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>
Cc: "PgAdmin Hackers" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Sequence bug
Date: 2004-10-21 13:39:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)de] 
> Sent: 21 October 2004 14:28
> To: Dave Page
> Cc: PgAdmin Hackers
> Subject: Re: [pgadmin-hackers] Sequence bug
> Dave Page wrote:
> > Hi guys,
> > 
> > Sorry, but I don't have any time to look at this right 
> now... I found 
> > a quoting bug in the sequence dialogue that prevents 
> modification of 
> > them (such as resetting the value) - should be trivial to 
> sort. I also 
> > suspect that resetting to zero won't work correctly because 
> we need to 
> > use something like setval('foo', $INCREMENT, false) to do that, 
> > however that might require some more thought.
> I found two issues, but not for the same version.
> ALTER SEQUENCE "TestSequenz"
> is perfectly ok for 7.4+. (but changing owner had some problems).
> On 7.3, setval will be used; there, quoting used qtString 
> instead of qtIdent. Also, I added the third setval argument 
> as false, this seems the least surprise for users. Not 
> checked with 7.3, please do that Dave.

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). Maybe
it's better not to try to allow resetting to 0 with 7,3?

Regards, Dave.


pgadmin-hackers by date

Next:From: Andreas PflugDate: 2004-10-21 13:54:21
Subject: Re: Sequence bug
Previous:From: Andreas PflugDate: 2004-10-21 13:27:54
Subject: Re: Sequence bug

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