The sample udf_rg_2 is included in a pre-compiled dynamic library called libv4apiex (extension is platform-dependent). Its implementation is in the samples directory in udf_rg_2.cxx.
To declare the table UDF to the server, issue:
CREATE OR REPLACE PROCEDURE udf_rg_2( IN num INT )
RESULT( c1 INT )
EXTERNAL NAME 'udf_rg_2@libv4apiex'
Select rows from the table UDF:
SELECT * FROM udf_rg_2( 5 );
To see how the describe affects behavior, issue a CREATE PROCEDURE statement that has a different schema than the one published by the table UDF. For example:
CREATE OR REPLACE PROCEDURE udf_rg_2( IN num INT, IN extra INT )
RESULT( c1 INT )
EXTERNAL NAME 'udf_rg_2@libv4apiex'