Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvroldan2013-05-15 06:04:29 -0400
committervroldan2013-05-15 06:04:29 -0400
commit0123d149fa1fd1e5c4977946723ff1138628533b (patch)
tree3f18e3b847e2fc38a7dee7e52ae5ec207839b8b6
parenta52fb52faa91063da702a07f81c5c0f6c1133914 (diff)
downloadcdo-bugs/323006b.tar.gz
cdo-bugs/323006b.tar.xz
cdo-bugs/323006b.zip
Missing changes on 323006: [DB] Various PostgreSQL test failuresbugs/323006b
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323006
-rw-r--r--plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
index fc24422542..62f73a3f67 100644
--- a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
@@ -10,6 +10,8 @@
* Eike Stepper - maintenance
* Stefan Winkler - Bug 276979
* Stefan Winkler - Bug 289445
+ * Stefan Winker - Bug 350137
+ * Victor Roldan Betancort - Bug 323006
*/
package org.eclipse.net4j.db.postgresql;
@@ -84,12 +86,18 @@ public class PostgreSQLAdapter extends DBAdapter
case LONGVARCHAR:
case VARCHAR:
case CLOB:
- return "text"; //$NON-NLS-1$
+ return "text"; //$NON-NLS-1$
+ case BINARY:
+ case LONGVARBINARY:
case VARBINARY:
case BLOB:
return "bytea"; //$NON-NLS-1$
case DOUBLE:
return "double precision"; //$NON-NLS-1$
+ case BIT:
+ return "boolean"; //$NON-NLS-1$
+ case TINYINT:
+ return "smallint"; //$NON-NLS-1
}
return super.getTypeName(field);
@@ -135,11 +143,11 @@ public class PostgreSQLAdapter extends DBAdapter
{
switch (type)
{
- // Due to Bug 289194: [DB] BLOB not correctly handled by PostgreSQL DBAdapter
- case BLOB:
- return DBType.VARBINARY;
+ case CHAR:
+ // Due to Bug 350137 (PostgreSQL does not like zeros in strings ...)
+ // SMALLINT won't fit since it only supports 32767 as maximum value, whereas Character.MAX_VALUE is 65535
+ return DBType.INTEGER;
}
-
return super.adaptType(type);
}

Back to the top