Re: Transaction atomicity - Mailing list pgsql-jdbc

From Giuseppe Sacco
Subject Re: Transaction atomicity
Date
Msg-id 1173288305.20645.67.camel@scarafaggio
Whole thread Raw
In response to Re: Transaction atomicity  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses [OT] Re: Transaction atomicity  (Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>)
List pgsql-jdbc
Hi Heikki,

Il giorno mer, 07/03/2007 alle 16.36 +0000, Heikki Linnakangas ha
scritto:
[...]
> If you don't want to have a two-field key, for example because you can't
> change the schema you already have, you could still divide a range of
> ids for each office when you create the sequence:
>
> CREATE SEQUENCE fooseq MINVALUE 10000000 MAXVALUE 19999999 NO CYCLE

This is the same solution I was thinking of, and probably the best one.
I checked that currently the application only loops an average of 4
times, so I don't have a real urgency of switching to sequences. I will
implement this code in two weeks from now, since I should have enough
time.

Thanks again,
Giuseppe

P.S. Just a note, I will not specify "NO CYCLE" since it seems to be the
default behaviour and since it seems oracle uses "NOCYCLE" in one word.

pgsql-jdbc by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Transaction atomicity
Next
From: "Heiko W.Rupp"
Date:
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?