lobSize

Returns the size of any BLOB/CLOB object as a BIGINT.

Setup Syntax
CREATE FUNCTION lobSize(BLOB) RETURNS BIGINT EXTERNAL NAME 'com.informix.judrs.LargeObjects.lobSize(java.sql.Blob)' LANGUAGE JAVA;
CREATE FUNCTION lobSize(CLOB) RETURNS BIGINT EXTERNAL NAME 'com.informix.judrs.LargeObjects.lobSize(java.sql.Clob)' LANGUAGE JAVA;
GRANT EXECUTE ON FUNCTION lobSize(BLOB) TO PUBLIC;
GRANT EXECUTE ON FUNCTION lobSize(CLOB) TO PUBLIC;
Usage
> insert into test values("Hello ", toClob("world"));
> select a, lobsize(b) from test;
                   a |         (expression) |
----------------------------------------
               Hello |                    5 |