Skip to content

Commit

Permalink
0005341: Add system property to control use of "on conflict" on Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Jun 21, 2022
1 parent a693061 commit dbe5b52
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -49,7 +49,8 @@ public static synchronized IDmlStatementFactory getInstance() {
public DmlStatement create(String databaseName, DmlStatementOptions options) {
if (DatabaseNamesConstants.ORACLE.equals(databaseName) || DatabaseNamesConstants.ORACLE122.equals(databaseName)) {
return new OracleDmlStatement(options);
} else if (DatabaseNamesConstants.POSTGRESQL.equals(databaseName)) {
} else if (DatabaseNamesConstants.POSTGRESQL.equals(databaseName) || (DatabaseNamesConstants.POSTGRESQL95.equals(databaseName) &&
System.getProperty("postgres.use.on.conflict", "").equalsIgnoreCase("false"))) {
return new PostgreSqlDmlStatement(options);
} else if (DatabaseNamesConstants.POSTGRESQL95.equals(databaseName)) {
return new PostgreSqlDmlStatement95(options);
Expand Down

0 comments on commit dbe5b52

Please sign in to comment.