postgresqloracleclobora2pg

How to import CLOB column in Oracle to large object in Postgres using Ora2PG


Our Application is on Oracle 19C where in table we have clob columns where were store json object as string. We have to migrate to PostGres(14). We are using ora2pg tool to generate ddl and also data migration. CLOB columns were modeled as text in postgres. I want to insert/copy the column values as large object so that table only holds reference to text. We have tried --lo_import, but its documentation says its for Blob. Is there a config we can use to make sure data inserted/copied goes in large object format.


Solution

  • Don't use large objects. They are obsolescent and have all kinds of nasty problems. By all means, use jsonb or json as target data type (which one depends on how you plan to use the data).