Browse Source

Drop version check in isGetGeneratedKeysSimulated (for PostgreSQL 10)

Issue: SPR-16556

(cherry picked from commit 4a4f2c2)
pull/1723/head
Juergen Hoeller 8 years ago
parent
commit
b643f7836c
  1. 14
      spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/PostgresTableMetaDataProvider.java

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

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2014 the original author or authors. * Copyright 2002-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -33,18 +33,10 @@ public class PostgresTableMetaDataProvider extends GenericTableMetaDataProvider
super(databaseMetaData); super(databaseMetaData);
} }
@Override @Override
public boolean isGetGeneratedKeysSimulated() { public boolean isGetGeneratedKeysSimulated() {
if (getDatabaseVersion().compareTo("8.2.0") >= 0) { return true;
return true;
}
else {
if (logger.isWarnEnabled()) {
logger.warn("PostgreSQL does not support getGeneratedKeys or INSERT ... RETURNING in version " +
getDatabaseVersion());
}
return false;
}
} }
@Override @Override

Loading…
Cancel
Save