例: SHOW FUNCTION (外部形式) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQLデータ定義言語 構文規則および例

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
2021年1月
Language
日本語
Last Update
2021-03-30
dita:mapPath
ja-JP/ncd1596241368722.ditamap
dita:ditavalPath
ja-JP/ncd1596241368722.ditaval
dita:id
B035-1144
Product Category
Software
Teradata Vantage

この例では、特定外部関数名addnumの現在のDDLおよび関数の本体が報告されます。

     SHOW FUNCTION addnum;
      *** 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;
        }