openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben short" <jamin.sh...@gmail.com>
Subject Re: SequenceGenerator not using cached ids.
Date Fri, 21 Sep 2007 09:27:37 GMT
Patrick,

Here are the document pages

[1] http://www.postgresql.org/docs/8.2/interactive/sql-createsequence.html
[2] http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html

And my DDL

CREATE SEQUENCE categoryidseq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 100
  CACHE 50;
ALTER TABLE categoryidseq OWNER TO jpa;

I can then use it via pgAdmin with the following sql..

SELECT nextval('categoryidseq');

And it returns id's incemented by 1.

Regards

Ben

On 9/21/07, Patrick Linskey <plinskey@gmail.com> wrote:
> Yep, I think that this is a bug of some sort. We're using the sequence:
>
> 28516313> executing prepstmnt 1772552 SELECT NEXTVAL('CategoryIdSeq')
>
> but we're just selecting the next value, not the increment size. It's
> weird that we are then using the increment size in the returned
> values, though.
>
> Does anyone know the syntax in Postgres to select a batch of numbers from a seq?
>
> -Patrick
>
> On 9/20/07, ben short <jamin.short@gmail.com> wrote:
> > My work around was to set the allocationSize property to 1, but that
> > kind of defeats the point of caching the id's.
> >
> > Regards
> >
> > Ben
> >
> > On 9/20/07, Takeichi Kanzaki Cabrera <tkanzakic@gmail.com> wrote:
> > > I have the same problem using postgresql + openjpa-1.0 and at this
> > > time I have no solution for it.
> > >
> > > --
> > > Regards,
> > > Takeichi Kanzaki Cabrera
> > > Linux Registered User #308138
> > >
> > > If you want to be original,
> > > be your self.
> > >
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>

Mime
View raw message