General Limitations and Restrictions on Table Functions
These general restrictions apply to table functions:
You can expand the number of protected mode servers for table functions from the default value of 2 to a maximum of 20 per AMP or PE vprocs. For details, see the cufconfig utility in Utilities: Volume 1 (A-K) and SQL External Routine Programming. The minimum is 0.
Protected mode servers consume disk resources as follows:
The system neither detects nor reports such a deadlock.
Suppose you create the following table and table function.
CREATE TABLE supp_indata (
CREATE FUNCTION c_mytable (a FLOAT, b FLOAT)
RETURNS TABLE (c3 FLOAT, c4 FLOAT )
PARAMETER STYLE SQL
EXTERNAL NAME 'CS!c_mytable!c_mytable.c';
The following SELECT request is not valid because it uses the FROM … JOIN …ON syntax.
FROM TABLE (c_mytable(supp_indata.a, supp_indata.b)) AS t1
JOIN supp_indata AS t2 ON t1.c3 = t2.b;
However, the following SELECT request that uses slightly different syntax for the join is valid.
FROM TABLE(c_mytable(supp_indata.a, supp_indata.b)) AS t1, supp_indata AS t2
WHERE t1.c3 = t2b;
If a row does exceed this limit, the system aborts the request in Teradata session mode or its containing transaction in ANSI session mode, rolls it back, and returns an error message to the requestor.
The system defers the maximum row size check until you invoke the function because it cannot know whether the limit will be exceeded by a table function defined with dynamic result rows until the function runs.
Note that you can do a limited amount of code checking by building the trace facility (see “CREATE GLOBAL TEMPORARY TRACE TABLE” on page 317) into the code with the FNC_Trace_Write or FNC_Trace_Write_DL library calls. For details about these library calls and other troubleshooting methods you can build into table functions, see SQL External Routine Programming.
IF you are specifying a LOB data type in this clause …
THEN you must specify the LOB type …
with an AS LOCATOR phrase.
without an AS LOCATOR phrase.