Re: Sequence Incrementing by 2 insted of 1

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: David <david(at)vanlaatum(dot)id(dot)au>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Sequence Incrementing by 2 insted of 1
Date: 2009-04-28 07:01:39
Message-ID: dcc563d10904280001n13857088xe50ab33b5db850db@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 28, 2009 at 12:38 AM, David <david(at)vanlaatum(dot)id(dot)au> wrote:
> Looked for that can't find anything and there is no reason why someone would have added that.

Well, unless you've got some example code for us to look at, it's
kinda hard to tell you what's wrong.

Often, you see people do something like this:

insert into autoincrementingtable values (DEFAULT, 'a', 500);
select nextval('autoinctable_seq');
yada yada yada

or something like that. i.e. there's an implicit call to the nextval
with the insert, and another explicit one somewhere in your code.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David 2009-04-28 07:19:55 Re: Sequence Incrementing by 2 insted of 1
Previous Message David 2009-04-28 06:38:19 Re: Sequence Incrementing by 2 insted of 1