[teiid-commits] teiid SVN: r3470 - branches/7.1.x/runtime/src/main/java/org/teiid/deployers.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Tue Sep 13 18:57:04 EDT 2011
Author: loleary
Date: 2011-09-13 18:57:03 -0400 (Tue, 13 Sep 2011)
New Revision: 3470
Modified:
branches/7.1.x/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.x/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2011-09-13 22:56:53 UTC (rev 3469)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java 2011-09-13 22:57:03 UTC (rev 3470)
@@ -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