Drop version check in isGetGeneratedKeysSimulated (for PostgreSQL 10)

Issue: SPR-16556
This commit is contained in:
Juergen Hoeller
2018-03-06 13:31:26 +01:00
parent e48def2d35
commit 4a4f2c2f08

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2017 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,19 +33,10 @@ public class PostgresTableMetaDataProvider extends GenericTableMetaDataProvider
super(databaseMetaData); super(databaseMetaData);
} }
@Override @Override
public boolean isGetGeneratedKeysSimulated() { public boolean isGetGeneratedKeysSimulated() {
String version = getDatabaseVersion(); return true;
if (version != null && version.compareTo("8.2.0") >= 0) {
return true;
}
else {
if (logger.isWarnEnabled()) {
logger.warn("PostgreSQL does not support getGeneratedKeys or INSERT ... RETURNING in version " +
version);
}
return false;
}
} }
@Override @Override