From: Marcus Better <marcusb@matematik.su.se>
To: pgsql-sql@postgresql.org
Subject: Serial numbers
Date: Thu, 28 Jan 1999 10:12:56 +0100 (CET)
Message-ID: <14000.10525.469359.464174@unreal.matematik.su.se> (raw)
In-Reply-To: <105463668@toto.iv>
Herouth Maoz writes:
> So, the inserts for the ccats table become:
>
> INSERT INTO ccats (cid, catid) VALUES (currval( 'name of seq' ), 5 );
What if someone does another INSERT between the two INSERTs, then the
number generator is stepped and the second table gets the wrong serial
number. Should one use LOCK here?
Marcus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: marcusb@matematik.su.se
Subject: Re: Serial numbers
In-Reply-To: <14000.10525.469359.464174@unreal.matematik.su.se>
References: <105463668@toto.iv> <14000.10525.469359.464174@unreal.matematik.su.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox