[OT] Re: Transaction atomicity - Mailing list pgsql-jdbc

From Giuseppe Sacco
Subject [OT] Re: Transaction atomicity
Date
Msg-id 1173373464.5627.9.camel@scarafaggio
Whole thread Raw
In response to Re: Transaction atomicity  (Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>)
List pgsql-jdbc
Il giorno mer, 07/03/2007 alle 18.25 +0100, Giuseppe Sacco ha scritto:
> Hi Heikki,
[...]
> > 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.

[a bit off topic]
Just for the records: sql-server doesn't accept the max() solution, so I
will have to implement the sequence way very quickly. The error I get
is: errorCode=1046, sqlState= S1000 "Subqueries are not allowed in this
context. Only scalar expressions are allowed" :-)

Again, thanks to all,
Giuseppe

pgsql-jdbc by date:

Previous
From: QuanZongliang
Date:
Subject: Re: Error while retrieving generated keys
Next
From: Dave Cramer
Date:
Subject: Re: Error while retrieving generated keys