IDEMPIERE-4465 Native Postgres - Error on Convert Layer (#400)

* IDEMPIERE-4465 Native Postgres - Error on Convert Layer

* IDEMPIERE-4465 Native Postgres - Error on Convert Layer
This commit is contained in:
Carlos Ruiz 2020-11-21 07:28:35 +01:00 committed by GitHub
parent b778904d42
commit 71049fa02b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 39 deletions

View File

@ -81,13 +81,6 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
*/
protected ArrayList<String> convertStatement(String sqlStatement) {
ArrayList<String> result = new ArrayList<String>();
if (DB_PostgreSQL.isUseNativeDialect()) {
sqlStatement = convertSysDate(sqlStatement);
sqlStatement = convertSimilarTo(sqlStatement);
result.add(sqlStatement);
return result;
}
/** Vector to save previous values of quoted strings **/
Vector<String> retVars = new Vector<String>();
@ -100,6 +93,14 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
}
String statement = replaceQuotedStrings(sqlStatement, retVars, nonce);
if (DB_PostgreSQL.isUseNativeDialect()) {
statement = convertSysDate(statement);
statement = convertSimilarTo(statement);
} else {
statement = convertWithConvertMap(statement);
statement = convertSimilarTo(statement);
statement = DB_PostgreSQL.removeNativeKeyworkMarker(statement);
@ -134,6 +135,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
} else {
statement = convertComplexStatement(convertAlias(statement));
}
}
if (retVars.size() > 0)
statement = recoverQuotedStrings(statement, retVars, nonce);
result.add(statement);