openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2196) Create Sequence Postgres 9.1
Date Wed, 20 Jun 2012 16:36:43 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397619#comment-13397619
] 

Kevin Sutter commented on OPENJPA-2196:
---------------------------------------

Since the title of this JIRA is generic enough, I'm also going to post the other issue that
came about due to the discussion on the mailing list (http://openjpa.208410.n2.nabble.com/Postgres-sequence-current-transaction-is-aborted-td7580299.html).

We have an issue with the permissions required to alter a database sequence with Postgres.
 Or, at least, that's the only database that seems to be reporting this error.  With the changes
introduced by OpenJPA-1376 and OpenJPA-2069, we are now blindly attempting to issue an "alter
sequence..".  This is not good for Postgres users since only the owner of the Sequence can
alter it.  So far, we must be lucking out with the other databases.

A couple of things that need to be re-looked at for this Sequence update.  Thanks.
                
> Create Sequence Postgres 9.1
> ----------------------------
>
>                 Key: OPENJPA-2196
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2196
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc, jpa
>    Affects Versions: 2.2.0
>         Environment: OpenJPA-2.2.0
> Transaction-type JTA
> Postgres 9.1
> JBoss 6.1
>            Reporter: Hendi Marcos Ramos Silva
>            Assignee: Albert Lee
>             Fix For: 2.2.1
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Sorry my bad english ..
> when annotated a entity with @SequenceGenerator and with allocationSize = 1 and initialValue
= 1, the method DBDictionary.commonCreateAlterSequenceSQL is creating a alter sequence sql
invalid for Postgres 9.1.
> Despite the documentation of postgres inform you that the other parameters are optional
(http://www.postgresql.org/docs/9.1/static/sql-altersequence.html), an error occurs in executing
the sql below.
> Eg: ALTER SEQUENCE schema_experimento.usuario_sq (no other attributes)
> Even the method NativeJDBCSeq.udpateSql being fault tolerant, the connection is marked
for rollback and not allowing run the next val of sequence.
> HĂȘndi Marcos

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message