IBM PureData System for Analytics, Version 7.1

SHOW FUNCTION

Use the SHOW FUNCTION command to display information about one or more functions (built-in and UDFs). The command checks your user account privileges to ensure that you are permitted to see information about the UDFs defined in the database and schema.

Synopsis

The SHOW FUNCTION command has the following syntax:
SHOW FUNCTION [ALL | ident] [VERBOSE]

Inputs

The SHOW FUNCTION command takes the following inputs:
Table 1. SHOW FUNCTION inputs
Input Description
ALL Show information about all the functions that are defined in the database. This is the default.
ident Show information about one or more functions that are defined in the database that begin with ident. You can specify a partial name, but the command returns an error if you specify a full signature.
VERBOSE Display detailed information about the functions.

Output

The SHOW FUNCTION command has the following output:
Table 2. SHOW FUNCTION output
Output Description
error found "(" (at char num) syntax error, unexpected '(', expecting $end The message that the system returns if you specify a full signature, for example:
show FUNCTION returntwo(); 

Description

The SHOW FUNCTION command is identical in behavior to the nzsql \df and \df+ commands.

Privileges required

Any user can run the command SHOW FUNCTION; however, you must be the admin user, own the UDF, or have object privileges on UDFs (such as Execute, List, Alter, or Drop) to see information about UDFs in the output.

Common Tasks

Use the SHOW FUNCTION command to display information about the functions in a database.

Usage

The following provides sample usage.
  • To show all the functions, use the following command. (The output is abbreviated for presentation in the document.)
    MYDB.SCHEMA(MYUSER)=> SHOW FUNCTION; 
                              List of functions
    
    RESULT           | FUNCTION     | BUILTIN | ARGUMENTS
    -----------------+--------------+---------+-------------------
    BIGINT           | ABS          |   t     | (BIGINT)
    DOUBLE PRECISION | ABS          |   t     | (DOUBLE PRECISION)
    INTEGER          | ABS          |   t     | (INTEGER)
    DOUBLE PRECISION | COS          |   t     | (DOUBLE PRECISION)
    DOUBLE PRECISION | COT          |   t     | (DOUBLE PRECISION)
    INTEGER          | CUSTOMERNAME |   f     | (CHARACTER VARYING (64000))
  • To show verbose information for the sample UDF named customername, use the following command.
    DEV.SCHEMA(MYUSER)=> SHOW FUNCTION customername VERBOSE;
     RESULT  |     FUNCTION     | BUILTIN |         ARGUMENTS          | NULLONNULLINPUT |
     DETERMINISTIC | LOGMASK | MEMORY | OWNER | VARARGS | FENCED | VERSION | LASTCALL |
     DESCRIPTION | DEPENDENCIES | LOCATION | ENV
    ---------+------------------+---------+----------------------------+-----------------+
    ---------------+---------+--------+-------+---------+--------+---------+----------+
    -------------+--------------+----------+-----
        INTEGER | CUSTOMERNAME     | f       | (CHARACTER VARYING(64000)) | t               |
     t             |NONE    | 0      | ADMIN | f       | t      |       1 |           |
                 |              |          |
    (1 row)


Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28