[teiid-commits] teiid SVN: r3226 - branches/7.1.1.CP2/runtime/src/main/java/org/teiid/deployers.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Jun 7 15:52:28 EDT 2011


Author: mdrillin
Date: 2011-06-07 15:52:27 -0400 (Tue, 07 Jun 2011)
New Revision: 3226

Modified:
   branches/7.1.1.CP2/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
Log:
TEIID-1623 - Resolves issue with ODBC precision and scale data for numeric and string types.


Modified: branches/7.1.1.CP2/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
===================================================================
--- branches/7.1.1.CP2/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java	2011-06-07 01:21:33 UTC (rev 3225)
+++ branches/7.1.1.CP2/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java	2011-06-07 19:52:27 UTC (rev 3226)
@@ -148,7 +148,8 @@
 				"pt.oid as atttypid," + //$NON-NLS-1$
 				"pt.typlen as attlen, " + //$NON-NLS-1$
 				"convert(t1.Position, short) as attnum, " + //$NON-NLS-1$
-				"t1.Length as atttypmod, " + //$NON-NLS-1$
+				"(CASE WHEN (t1.DataType = 'bigdecimal' OR t1.DataType = 'biginteger' OR t1.DataType = 'float' OR t1.DataType='double') THEN (4+(65536*t1.Precision)+t1.Scale) " + //$NON-NLS-1$
+				"ELSE (4+t1.Length) END) as atttypmod, " + //$NON-NLS-1$
 				"CASE WHEN (t1.NullType = 'No Nulls') THEN true ELSE false END as attnotnull, " + //$NON-NLS-1$
 				"false as attisdropped, " + //$NON-NLS-1$
 				"false as atthasdef " + //$NON-NLS-1$



More information about the teiid-commits mailing list