oracle_fdw icon indicating copy to clipboard operation
oracle_fdw copied to clipboard

Add support for NCLOB column type

Open intgr opened this issue 2 years ago • 4 comments

This uses the TO_CLOB() Oracle function to convert NCLOB values into CLOB values.

Doc: https://docs.oracle.com/database/121/SQLRF/functions218.htm

Do you see any downsides to doing this?

Only tested with SELECT & VACUUM.

The comment in the NCLOB handling code previously stated:

 * We don't support NCLOB because Oracle cannot
 * transform it to the client character set automatically.

I have not verified whether this trick solves the character set conversion issue.

intgr avatar Dec 23 '22 11:12 intgr

Thanks for the initiative! I think that this is missing write support. A regression test is also necessary, but I could help with that.

laurenz avatar Dec 23 '22 11:12 laurenz

Added tests. Inserting seems to work fine using the same logic as CLOB type.

Or are there any gotchas that didn't occur to me?

intgr avatar Dec 30 '22 14:12 intgr

Thanks! I'll take a close look at that when I come back from vacation on Jan 9.

laurenz avatar Dec 30 '22 15:12 laurenz

Are you going to send an updated patch?

laurenz avatar Apr 11 '23 14:04 laurenz