Updated on 2022-11-18 GMT+08:00

SHOW FUNCTIONS

Syntax

SHOW FUNCTIONS [LIKE pattern [ESCAPE escapeChar]];

SHOW EXTERNAL FUNCTIONS;

SHOW EXTERNAL FUNCTION qualified_function_name;

Description

Displays the definitions of all built-in functions.

Displays the description of all Java and JDBC functions.

Displays the definition of a specified function.

Example

SHOW functions;
 
-- Use the LIKE clause.
show functions like 'boo_%';
 Function | Return Type | Argument Types | Function Type | Deterministic | Description 
----------|-------------|----------------|---------------|---------------|-------------
 bool_and | boolean     | boolean        | aggregate     | true          |             
 bool_or  | boolean     | boolean        | aggregate     | true          |             
(2 rows)

-- If a character in the matching character string conflicts with the wildcard, you can specify an escape character to identify the character. For example, to query all tables whose table name prefix is t_ in the default schema, set the escape character to \.
SHOW FUNCTIONS LIKE 'array\_%' escape '\';
  Function     | Return Type |         Argument Types          | Function Type | Deterministic 
|                                              Description                                               | Variable Arity | Built In 
-----------------|-------------|---------------------------------|---------------|---------------
|--------------------------------------------------------------------------------------------------------|----------------|----------
 array_agg       | array(T)    | T                               | aggregate     | true          
| return an array of values                                                                              | false          | true     
 array_contains  | boolean     | array(T), T                     | scalar        | true          
| Determines whether given value exists in the array                                                     | false          | true     
 array_distinct  | array(E)    | array(E)                        | scalar        | true          
| Remove duplicate values from the given array                                                           | false          | true     
 array_except    | array(E)    | array(E), array(E)              | scalar        | true          
| Returns an array of elements that are in the first array but not the second, without duplicates.       | false          | true     
 array_intersect | array(E)    | array(E), array(E)              | scalar        | true          
| Intersects elements of the two given arrays                                                            | false          | true     
 array_join      | varchar     | array(T), varchar               | scalar        | true          
| Concatenates the elements of the given array using a delimiter and an optional string to replace nulls | false          | true     
 array_join      | varchar     | array(T), varchar, varchar      | scalar        | true          
| Concatenates the elements of the given array using a delimiter and an optional string to replace nulls | false          | true     
 array_max       | T           | array(T)                        | scalar        | true          
| Get maximum value of array                                                                             | false          | true     
 array_min       | T           | array(T)                        | scalar        | true          
| Get minimum value of array                                                                             | false          | true     
 array_position  | bigint      | array(T), T                     | scalar        | true          
| Returns the position of the first occurrence of the given value in array (or 0 if not found)           | false          | true     
 array_remove    | array(E)    | array(E), E                     | scalar        | true          
| Remove specified values from the given array                                                           | false          | true     
 array_sort      | array(E)    | array(E)                        | scalar        | true          
| Sorts the given array in ascending order according to the natural ordering of its elements.            | false          | true     
 array_sort      | array(T)    | array(T), function(T,T,integer) | scalar        | true          
| Sorts the given array with a lambda comparator.                                                        | false          | true     
 array_union     | array(E)    | array(E), array(E)              | scalar        | true          
| Union elements of the two given arrays                                                                 | false          | true     

-- View all Java and JDBC functions.
SHOW external functions;
  Function                  |   Owner   
----------------------------|-----------
 example.namespace02.repeat | admintest 
 hetu.default.add_two       | admintest 
(2 rows)

-- View the definition of a specified function.
SHOW external function example.namespace02.repeat;
          External Function           
--------------------------------------
 External FUNCTION example.namespace02.repeat ( 
    s varchar,                        
    n integer                         
 )                                    
 RETURNS varchar                      

 COMMENT ''                           
 LANGUAGE JDBC                        
 NOT DETERMINISTIC                    
 CALLED ON NULL INPUT                 

 FUNCPROPERTIES (                     
    owner = 'admintest'               
 )