[teiid-commits] teiid SVN: r4309 - in trunk: engine/src/main/java/org/teiid/query/function and 1 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Fri Aug 10 13:12:21 EDT 2012


Author: shawkins
Date: 2012-08-10 13:12:21 -0400 (Fri, 10 Aug 2012)
New Revision: 4309

Modified:
   trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
   trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
   trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
Log:
TEIID-2138 changing the pg standard_conforming_strings default

Modified: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html	2012-08-10 17:10:29 UTC (rev 4308)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html	2012-08-10 17:12:21 UTC (rev 4309)
@@ -64,6 +64,7 @@
   <li>TEIID-2105 It was an undocumented behavior that is a source did not specify a jndi connection that "java:/name" would be assumed.  That is no longer the case.  It the source needs a connection, then one must be specified.
   <li>TEIID-2127 if ExecutionFactory.isSourceRequired returns true (the default) then not obtaining a connection will for an Execution will result in an error.  If an ExecutionFactory does not use a source, then no connection-jndi-name should be
 specified and isSourceRequired should return false (see setSourceRequired).  If isSourceRequired returns false and a connection-jndi-name is specified, then Teiid will still attempt to obtain a connection, but no exception will be thrown if a connection isn't available.
+  <li>TEIID-2138 the odbc layer will report standard_conforming_strings as on, rather than off to better reflect the string literal handling of Teiid.
 <ul>
 
 <h4>from 7.x</h4>

Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java	2012-08-10 17:10:29 UTC (rev 4308)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java	2012-08-10 17:12:21 UTC (rev 4309)
@@ -392,13 +392,9 @@
 	public static int dayOfWeek(Date x) {
 		int result = getField(x, Calendar.DAY_OF_WEEK);
 		if (TimestampWithTimezone.ISO8601_WEEK) {
-			result -= 1;
-			if (result == 0) {
-				return 7;
-			}
-			return result;
+			return (result + 6) % 7;
 		}
-		return getField(x, Calendar.DAY_OF_WEEK);
+		return result;
 	}
 
 	// ================== Function = dayofyear =====================

Modified: trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java	2012-08-10 17:10:29 UTC (rev 4308)
+++ trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java	2012-08-10 17:12:21 UTC (rev 4309)
@@ -266,7 +266,7 @@
 		sendParameterStatus("server_encoding", "SQL_ASCII");
 		sendParameterStatus("server_version", "8.1.4");
 		sendParameterStatus("session_authorization", this.props.getProperty("user"));
-		sendParameterStatus("standard_conforming_strings", "off");
+		sendParameterStatus("standard_conforming_strings", "on");
 		sendParameterStatus("application_name", this.props.getProperty("application_name", "ODBCClient"));
 		
 		// TODO PostgreSQL TimeZone



More information about the teiid-commits mailing list