This example reports the current DDL and function body for the specific external function name addnum.
SHOW FUNCTION addnum;
Result:
*** Text of DDL statement returned. *** Total elapsed time was 1 second. ------------------------------------------------------------ REPLACE FUNCTION rgs.add_num (p1 INTEGER, p2 FLOAT) RETURNS FLOAT SPECIFIC add_num LANGUAGE C NO SQL PARAMETER STYLE SQL NOT DETERMINISTIC CALLED ON NULL INPUT EXTERNAL NAME 'cs!first1!udftest/first1.c!F!first1' *** Text of DDL statement returned. #define SQL_TEXT Latin_Text #include <sqltypes_td.h> /* add integer and float */ void first1(INTEGER *a, FLOAT *b, FLOAT *result, INT *indc_a, INT *indc_b, INT *indc_result, CHAR sqlstate[6], SQL_TEXT extname[129], SQL_TEXT specific_name[129], SQL_TEXT error_message[257]) { if (*indc_a == -1 || *indc_b == -1) { *indc_result = -1; return; } *result = *a + *b; *indc_result = 0; }