Hi Marco, Yes, I am updating the OpenJPA-2196 JIRA with pertinent information from this discussion. Thanks for your help in debugging the issue(s).
Kevin On Wed, Jun 20, 2012 at 10:42 AM, Marco de Booij <[email protected]> wrote: > Hi Kevin, > > You answered for me but I want to clarify it for John. > > The GRANT SELECT, UPDATE, INSERT, DELETE only works for data in a table > (For a sequence you only need SELECT and UPDATE). The solution in openJPA > for the sequence involves a change in the definition of the SEQUENCE. In > PostgreSQL I have not found the way to grant this right so the user that is > used in the application must be the owner of the sequence. In Oracle this > is possible with GRANT ALTER. This is different from the table solution > that you mention. The table solution however is more generic (and supports > rollback) since not all databases support the SEQUENCE. > > Thanks for all the help. For me this thread is finished. I can now use the > SEQUENCE. I hope that in one of the next versions we can bypass this ALTER > SEQUENCE statement. > > Regards, > > Marco > Op 20-06-12 15:50, Boblitz John schreef: > > Hi Keven, >> >> Oh. >> >> The same GRANT will work though - no need to play with ownership. >> >> Cheers! >> >> John >> >> -----Ursprüngliche Nachricht----- >>> Von: Kevin Sutter [mailto:[email protected]] >>> Gesendet: Mittwoch, 20. Juni 2012 15:32 >>> An: [email protected] >>> Betreff: Re: Postgres sequence: current transaction is aborted >>> >>> Hi John, >>> In this case, Marco was using a database Sequence, not the >>> OpenJPA sequence table. There was an issue with having >>> permissions to alter the Sequence with Postgres. Just wanted >>> to clarify. Thanks! >>> >>> Kevin >>> >>> On Wed, Jun 20, 2012 at 12:57 AM, Boblitz John >>> <[email protected]>**wrote: >>> >>> You can set the permissions for the table with: >>>> >>>> GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE >>>> [SchemaName].openjpa_sequence_**table TO [UserName]; >>>> >>>> *NOTE: This Sequence Table was autogenerated by openJPA - you name >>>> might be different! >>>> >>>> >>>> John >>>> >>>> >>>> >
