[teiid-commits] teiid SVN: r2934 - trunk/runtime/src/main/java/org/teiid/deployers.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Feb 23 13:51:20 EST 2011


Author: rareddy
Date: 2011-02-23 13:51:19 -0500 (Wed, 23 Feb 2011)
New Revision: 2934

Modified:
   trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
Log:
TEIID-1480: Teiid was projecting the length of the columns as the attribute lengths; however pg expects them to be the size defined in the pg_type table for that type.

Modified: trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java	2011-02-23 18:23:31 UTC (rev 2933)
+++ trunk/runtime/src/main/java/org/teiid/deployers/PgCatalogMetadataStore.java	2011-02-23 18:51:19 UTC (rev 2934)
@@ -145,7 +145,7 @@
 				"st.oid as attrelid, " + //$NON-NLS-1$
 				"t1.Name as attname, " + //$NON-NLS-1$
 				"pt.oid as atttypid," + //$NON-NLS-1$
-				"convert(t1.Length, short) as attlen, " + //$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$
 				"false as attnotnull, " + //$NON-NLS-1$



More information about the teiid-commits mailing list