OFBIZ-8137 Entityname starts with schema name causes error in PostgreSQL

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759155 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shi Jinghai
2016-09-04 08:57:44 +00:00
parent 4a63aaba7d
commit 5981061dcf
@@ -1001,7 +1001,7 @@ public class DatabaseUtil {
String tableName = tableSet.getString("TABLE_NAME");
// for those databases which do not return the schema name with the table name (pgsql 7.3)
boolean appendSchemaName = false;
if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName)) {
if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName + "\\.")) {
appendSchemaName = true;
}
if (needsUpperCase && tableName != null) {
@@ -3042,7 +3042,7 @@ public class DatabaseUtil {
String tableName = rawTableName;
// for those databases which do not return the schema name with the table name (pgsql 7.3)
boolean appendSchemaName = false;
if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName)) {
if (tableName != null && lookupSchemaName != null && !tableName.startsWith(lookupSchemaName + "\\.")) {
appendSchemaName = true;
}
if (needsUpperCase && tableName != null) {