| I get the same behaviour with hibernate 5.2.17, org.hibernate.dialect.PostgreSQL95Dialect . If I set
globally_quoted_identifiers: true
temp.use_jdbc_metadata_defaults: false
then, after an insert I get the following SQL statement executed:
select currval('"user"_"id"_seq')
then I get this exception
org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
org.postgresql.util.PSQLException: ERROR: invalid name syntax
Note: If I don't set the use_jdbc_metadata_defaults option to false, then I don't have this problem, because hibernate gets the new id without resorting to the malformed select currval statement. However this can obviously only be considered a workaround. |