pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>
To: pgsql-jdbc@postgresql.org
Subject: Re: Transaction atomicity
Date: Wed, 07 Mar 2007 18:25:05 +0100
Message-ID: <1173288305.20645.67.camel@scarafaggio> (raw)
In-Reply-To: <45EEEA1C.5050105@enterprisedb.com>
References: <C2143278.1F03%jeff.hubbach@cha.com>
	<45EEEA1C.5050105@enterprisedb.com>

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.



view thread (13+ messages)  latest in thread

Message-ID: <1173288305.20645.67.camel@scarafaggio>
Permalink:  ../1173288305.20645.67.camel@scarafaggio/
Also on:    postgresql.org/message-id/1173288305.20645.67.camel@scarafaggio

 · 

reply

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-jdbc@postgresql.org
  Cc: giuseppe@eppesuigoccas.homedns.org
  Subject: Re: Transaction atomicity
  In-Reply-To: <1173288305.20645.67.camel@scarafaggio>
  References: <C2143278.1F03%jeff.hubbach@cha.com> <45EEEA1C.5050105@enterprisedb.com> <1173288305.20645.67.camel@scarafaggio>

* 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