[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3880) org.hibernate.id.enhanced.TableStructure missing "as" keyword in select statment column renames; required for PostgreSQL

dnalos (JIRA) noreply at atlassian.com
Fri Jun 5 06:21:14 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33343#action_33343 ] 

dnalos commented on HHH-3880:
-----------------------------

   @Id
   @Column(unique = true, nullable = false)
   @GeneratedValue(generator = "seqStyleGenerator")
   @GenericGenerator(name = "seqStyleGenerator", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = {
           @Parameter(name = "increment_size", value = "200"), @Parameter(name = "optimizer", value = "pooled"),
           @Parameter(name = "force_table_use", value = "true")})
   private long _dbID; 


Here is our hibernate configuration.

> org.hibernate.id.enhanced.TableStructure missing "as" keyword in select statment column renames; required for PostgreSQL
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-3880
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3880
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.3.1
>         Environment: Hibernate Core 3.3.1
> PostgreSQL 8.3
>            Reporter: dnalos
>            Assignee: Steve Ebersole
>             Fix For: 3.2.x, 3.3.x, 3.5
>
>
> I have reporte this problem in forum, but it rebuilding now, so i create a jira task.
> We use org.hibernate.id.enhanced.SequenceStyleGenerator to generate our id. The tests running under mysql and hsql, but not under postgres.
> And we find a small bug in org.hibernate.id.enhanced.TableStructure, the constructor of this class maked e.g. the select script:
> select next_val id_val from hibernate_sequence for update
> But in Postgresql neds "as" between next_val and id_val. See this sentence from PostgreSQL (http://sql-info.de/en/postgresql/postgres-gotchas.html#1_1):
> In the SQL92 standard, the optional keyword AS is just noise and can be omitted without affecting the meaning. The PostgreSQL parser requires this keyword when renaming output columns because the type extensibility features lead to parsing ambiguities in this context. AS is optional in FROM items, however. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list