Search code examples
postgresqldb2database-migrationsqldatatypesclob

Clob(length 1048576) DB2 to PostgreSQL best datatype?


We had a table with a column with a Clob(length 1048576) that would store search text that helps with searching. When I transferred it from DB2 to Postgres in our migration, I found that it wasn't working as well. So I going to try text or varchar, but I was finding it would take much longer for the long text entries to be added to the table to the point my local wildfly window would timeout when trying to run.

What is the equilavelent of a datatpye that accepts text that I should be using in postgres to replace a Clob that was length 1048576 in DB2? It might be that I was using the right datatypes but didn't have the right corresponding size.


Solution

  • Use text. That is the only reasonable data type for long character strings.