Re: serial column vs. explicit sequence question

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Charlie Toohey <ctoohey(at)pacbell(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: serial column vs. explicit sequence question
Date: 2002-06-13 22:13:32
Message-ID: 20020613151223.D8240-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Thu, 13 Jun 2002, Charlie Toohey wrote:

> If session A and session B are concurrently doing the same master-detail
> transaction, wouldn't currval possibly reflect the sequence value used by the
> other session ? Or are you saying that since this will be an explicit
> transaction that currval won't reflect the fact that the sequence may have
> been incremented by another session ?

currval is defined to give the last value given to your session. The only
cases you have to watch out for are other potential nextvals in your
session (triggers/rules), but usually you can find those pretty easily.

Browse pgsql-sql by date

  From Date Subject
Next Message Charlie Toohey 2002-06-13 22:15:18 Re: serial column vs. explicit sequence question
Previous Message Stephan Szabo 2002-06-13 22:12:18 Re: Please help me out on this insert error