Re: Getting consecutive sequence values

From: Dave Smith <dave(dot)smith(at)candata(dot)com>
To: nolan(at)celery(dot)tssi(dot)com
Cc: pgsql list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Getting consecutive sequence values
Date: 2003-04-04 21:06:04
Message-ID: 3E8DF3BC.8080609@candata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm assuming that the setval would create an exclusive lock on the
sequence until it is complete. Tom/Bruce?

nolan(at)celery(dot)tssi(dot)com wrote:

>>select setval('id',nextval('id')+100)
>>
>>
>
>That's certainly tidier than my lengthy SQL statement, but I don't know
>that it solves the concurrent access issue. What happens if a 2nd call
>to nextval is issued at the same time?
>--
>Mike Nolan
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ed L. 2003-04-04 22:11:58 Re: dbmirror revisions
Previous Message nolan 2003-04-04 20:53:36 Re: Getting consecutive sequence values