(I've also asked this question on StackOverflow in case people would rather comment there.)

I have an LVARCHAR(4096) column that, in a perfect world, I would like to change to be a TEXT column.

No ALTER TABLE foo MODIFY bar TEXT statement that I can come up with will do the trick. Informix keeps telling me that I need to create a CAST that can convert the data from LVARCHAR to TEXT. I have read the documentation, and understand what is being asked for, but I have no idea what sort of function to write that would take an LVARCHAR and somehow extract its "textness" out in such a way that it could be returned as TEXT.

So: how can I perform this column alteration?