db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r398721 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java
Date Mon, 01 May 2006 22:44:34 GMT
Author: tomdz
Date: Mon May  1 15:44:31 2006
New Revision: 398721

URL: http://svn.apache.org/viewcvs?rev=398721&view=rev
Log:
Fixed reading of PostgreSQL's TEXT/BYTEA columns

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java?rev=398721&r1=398720&r2=398721&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java
(original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/postgresql/PostgreSqlModelReader.java
Mon May  1 15:44:31 2006
@@ -102,6 +102,15 @@
             if (column.getSizeAsInt() <= 0)
             {
                 column.setSize(null);
+                // PostgreSQL reports BYTEA and TEXT as BINARY(-1) and VARCHAR(-1) respectively
+                if (column.getTypeCode() == Types.BINARY)
+                {
+                    column.setTypeCode(Types.BLOB);
+                }
+                else if (column.getTypeCode() == Types.VARCHAR)
+                {
+                    column.setTypeCode(Types.CLOB);
+                }
             }
         }
 



Mime
View raw message