Running the Sample Table UDF udf_blob.cxx

The sample udf_blob is included in a precompiled dynamic library called libv4apiex (extension is platform-dependent). Its implementation is in the samples directory in udf_blob.cxx.

  1. ITo declare the table UDF to the server, issue:
    CREATE PROCEDURE udf_blob( IN data long varchar, letter char(1) )
    RESULT ( c1 BIGINT )
    EXTERNAL NAME 'udf_blob@libv4apiex'
    
  2. Select rows from the table UDF:
    set temporary option Enable_LOB_Variables = 'On';
    create variable testblob long varchar;
    set testblob = 'aaaaaaaaaabbbbbbbbbbbb';
    select * from udf_blob(testblob, 'a');
    
    The supplied string contains the letter "a" 10 times.