DESCRIBE FUNCTION¶
Describes the specified user-defined function (UDF) or external function, including the signature (i.e. arguments), return value, language, and body (i.e. definition).
DESCRIBE can be abbreviated to DESC.
- See also:
DROP FUNCTION , ALTER FUNCTION , CREATE FUNCTION , SHOW USER FUNCTIONS , SHOW EXTERNAL FUNCTIONS
Syntax¶
DESC[RIBE] FUNCTION <name> ( [ <arg_data_type> ] [ , ... ] )
Parameters¶
name
Specifies the identifier for the function to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
arg_data_type [ , ... ]
Specifies the data type of the argument(s), if any, for the function. The argument data types are necessary because functions support name overloading (i.e. two functions in the same schema can have the same name) and the argument data types are used to identify the function.
Usage notes¶
To post-process the output of this command, you can use the pipe operator (
->>
) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is
type
, then specify"type"
for the identifier.
Examples¶
This demonstrates the DESCRIBE FUNCTION command:
DESC FUNCTION multiply(number, number); -----------+----------------------------------+ property | value | -----------+----------------------------------+ signature | (a NUMBER(38,0), b NUMBER(38,0)) | returns | NUMBER(38,0) | language | SQL | body | a * b | -----------+----------------------------------+