From: | Giuseppe Sacco <giuseppe(at)eppesuigoccas(dot)homedns(dot)org> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Transaction atomicity |
Date: | 2007-03-07 17:25:05 |
Message-ID: | 1173288305.20645.67.camel@scarafaggio |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Heiko W.Rupp | 2007-03-08 16:06:53 | Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)? |
Previous Message | Giuseppe Sacco | 2007-03-07 16:39:00 | Re: Transaction atomicity |