[teiid-commits] teiid SVN: r674 - trunk/server/src/main/java/com/metamatrix/common/jdbc/db.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Mar 31 17:10:33 EDT 2009


Author: vhalbert at redhat.com
Date: 2009-03-31 17:10:32 -0400 (Tue, 31 Mar 2009)
New Revision: 674

Modified:
   trunk/server/src/main/java/com/metamatrix/common/jdbc/db/PostgresPlatform.java
Log:
TEIID-448 -  Error Finding Latest active VDB suing Postgres as a Repository - The PostgresPlatform needed to override the default to add its specific UPPER operator to its platform. 


Modified: trunk/server/src/main/java/com/metamatrix/common/jdbc/db/PostgresPlatform.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/common/jdbc/db/PostgresPlatform.java	2009-03-31 21:08:57 UTC (rev 673)
+++ trunk/server/src/main/java/com/metamatrix/common/jdbc/db/PostgresPlatform.java	2009-03-31 21:10:32 UTC (rev 674)
@@ -25,8 +25,10 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.util.Map;
 
 import com.metamatrix.common.jdbc.JDBCPlatform;
+import com.metamatrix.common.jdbc.syntax.ExpressionOperator;
 
 public class PostgresPlatform extends JDBCPlatform {
 
@@ -42,8 +44,18 @@
     
     public boolean isDefault() {
         return false;
-    }    
+    }   
+    
+    protected Map buildPlatformOperators() {
+        Map operators = super.buildPlatformOperators();
 
+        // override for Oracle specfic
+        addOperator(ExpressionOperator.simpleFunction("toUpperCase","UPPER")); //$NON-NLS-1$ //$NON-NLS-2$
+
+        return operators;
+
+  }    
+
     public boolean isClosed(Connection connection) {
         
         if(!super.isClosed(connection)) {




More information about the teiid-commits mailing list