Skip to content

Commit 4a4f2c2

Browse files
committed
Drop version check in isGetGeneratedKeysSimulated (for PostgreSQL 10)
Issue: SPR-16556
1 parent e48def2 commit 4a4f2c2

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/PostgresTableMetaDataProvider.java

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,19 +33,10 @@ public PostgresTableMetaDataProvider(DatabaseMetaData databaseMetaData) throws S
3333
super(databaseMetaData);
3434
}
3535

36+
3637
@Override
3738
public boolean isGetGeneratedKeysSimulated() {
38-
String version = getDatabaseVersion();
39-
if (version != null && version.compareTo("8.2.0") >= 0) {
40-
return true;
41-
}
42-
else {
43-
if (logger.isWarnEnabled()) {
44-
logger.warn("PostgreSQL does not support getGeneratedKeys or INSERT ... RETURNING in version " +
45-
version);
46-
}
47-
return false;
48-
}
39+
return true;
4940
}
5041

5142
@Override

0 commit comments

Comments
 (0)