openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco de Booij <>
Subject Re: AW: Postgres sequence: current transaction is aborted
Date Wed, 20 Jun 2012 15:42:04 GMT
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 

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 


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 []
>> Gesendet: Mittwoch, 20. Juni 2012 15:32
>> An:
>> 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
>> <>wrote:
>>> You can set the permissions for the table with:
>>> [SchemaName].openjpa_sequence_table TO [UserName];
>>> *NOTE:  This Sequence Table was autogenerated by openJPA - you name
>>> might be different!
>>> John

View raw message