Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgresTableMetaDataProvider.isGetGeneratedKeysSimulated() does not detect Postgres 10 [SPR-16556] #21099

Closed
spring-projects-issues opened this issue Mar 6, 2018 · 4 comments
Assignees
Labels
in: data status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Mar 6, 2018

LI Geng opened SPR-16556 and commented

After postgresql server upgraded to version 10+, string comparison fails to return correct value.

In PostgresTableMetaDataProvider.java:

if (version != null && version.compareTo("8.2.0") >= 0) {
     return true;
}

"10".compareTo("8.2.0") < 0


Affects: 3.2.18, 4.3.10, 5.0.4

Issue Links:

  • #21152 CallMetaDataContext.reconcileParameters doesn't catch output parameters with DatabaseMetaData.procedureColumnResult type (on Postgres)
  • #21101 Consistent incrementer arrangement for PostgreSQL, DB2 and SAP HANA

Referenced from: pull request #1717, and commits 4a4f2c2, b643f78

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 6, 2018

Juergen Hoeller commented

We can streamline this towards always returning true from isGetGeneratedKeysSimulated since we don't support any Postgres version older than 8.2 to begin with...

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 6, 2018

Juergen Hoeller commented

This is available in the latest 5.0.5.BUILD-SNAPSHOT. Please give it a try if you have the chance!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 7, 2018

LI Geng commented

Is there a planned release for v3.x of the spring framework to fix this issue? As 3.x was still the mainstream release version about 2 years ago, a fix would be nice to those running legacy application java codes but wishing to upgrade their underlying database components. ;)

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Mar 7, 2018

Juergen Hoeller commented

I'm going to backport this fix to 4.3.15 today, but I'm afraid 3.2.x reached its end-of-life more than a year ago already (https://spring.io/blog/2015/06/15/spring-framework-3-2-x-eol-on-dec-31-2016), with no further releases planned.

Note that PostgreSQL 10 is a very recent release: It came almost a year after the Spring Framework 3.2.x EOL date. We generally only support such recent target database and application server releases in our active framework branches. In other words, if you upgrade your database to such a recent release, we also expect you to upgrade to a current Spring Framework generation (ideally 5.0.x; at least 4.3.x).

You could patch your spring-jdbc-3.2.18.jar yourself for the time being. However, I highly recommend an upgrade to 4.3.15 which should be quite straightforward in any case as long as you run on reasonably recent infrastructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants