Running the Sample Table UDF in udf_rg_3.cxx

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

  1. To declare the Table UDF to the server, issue:
    CREATE OR REPLACE PROCEDURE udf_rg_3( IN num INT )
    RESULT( c1 INT )
    EXTERNAL NAME 'udf_rg_3@libv4apiex'
  2. Select rows from the table UDF:
    SELECT * FROM udf_rg_3( 200 );
    This query produces values for c1 from 0…99 followed by 0…99.