Revision: 5935
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5935&view=rev
Author: manningr
Date: 2010-10-30 17:51:41 +0000 (Sat, 30 Oct 2010)
Log Message:
-----------
Pass in the column jdbc type that may have already been replaced (if it is "OTHER" type; 1111).
Modified Paths:
--------------
trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapper.java
trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java
Modified: trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapper.java
===================================================================
--- trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapper.java 2010-10-30 17:47:47 UTC (rev 5934)
+++ trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/ColTypeMapper.java 2010-10-30 17:51:41 UTC (rev 5935)
@@ -74,7 +74,7 @@
colJdbcType = DBUtil.replaceOtherDataType(colInfo, sourceSession);
// If the source column is DISTINCT and the session is PostgreSQL, try to get the underlying type.
- colJdbcType = DBUtil.replaceDistinctDataType(colInfo, sourceSession);
+ colJdbcType = DBUtil.replaceDistinctDataType(colJdbcType, colInfo, sourceSession);
// Oracle can only store DECIMAL type numbers. Since regular non-decimal
// numbers appear as "decimal", Oracle's decimal numbers can be rather
Modified: trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java
===================================================================
--- trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java 2010-10-30 17:47:47 UTC (rev 5934)
+++ trunk/sql12/plugins/dbcopy/src/main/java/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java 2010-10-30 17:51:41 UTC (rev 5935)
@@ -723,9 +723,9 @@
* @return the type code of the matching type, or if not found, the type code is taken from the specified
* colInfo
*/
- public static int replaceDistinctDataType(TableColumnInfo colInfo, ISession session)
+ public static int replaceDistinctDataType(int colJdbcType, TableColumnInfo colInfo, ISession session)
{
- int colJdbcType = colInfo.getDataType();
+
if (colJdbcType == java.sql.Types.DISTINCT && DialectFactory.isPostgreSQL(session.getMetaData()))
{
Connection con = session.getSQLConnection().getConnection();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|