Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

SHOW PROCEDURE / PROCEDURES command

The SHOW PROCEDURES command displays information about named procedures, including all built-in procedures in the catalog and all user-defined procedures in the used schema. To view information about a specific named procedure, use the SHOW PROCEDURE <procedure_name> command.

If the current user does not have USAGE on the current schema, built-in procedures are still returned, but user-defined procedures in that schema are omitted. For more information, see Schema access control.

The following table describes the returned information:

Column Description
proc_type The type of the procedure, which indicates the language in which the procedure is written. Valid values: CPP (C++) and GQL.
module The module to which the procedure belongs. A module refers to a file that contains a set of related code for defining the procedure.
schema The schema in which the procedure exists. All built-in procedures have empty schema fields since they are not associated with any schema.
owner The owner of the procedure. All built-in procedures have empty owner fields since they are provided by the system.
name The name of the procedure.
parameters The input parameters accepted by the procedure and their data types. If the procedure does not accept any input parameters, this field is empty.
return_fields The output parameters of the procedure, including the parameter names and their data types.
null_case How the procedure handles null inputs. For procedures written in GQL, the value defaults to raise error on null input, which means that the procedure raises an error if any input parameter is set to null.
comment The description of the procedure.

Syntax

show_procedures_command
SHOW PROCEDURES
show_procedure_command
SHOW PROCEDURE procedure_name

show_procedures_command ::=
    'SHOW' 'PROCEDURES'
show_procedure_command ::=
    'SHOW' 'PROCEDURE' procedure_name

Parameters

procedure_name

The name of the procedure for which to display information.

You can specify a regular expression to match multiple procedures. The regular expression must be enclosed in double quotes (") or backticks (`). For example, SHOW PROCEDURE "show.*" matches all procedures whose names start with show.

To view all the named procedures, use the SHOW PROCEDURES command.

Examples

Show all procedures

SHOW PROCEDURES

Return:

+-----------+-------------------+--------+-------+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+
| proc_type | module            | schema | owner | name                                      | parameters                                                                                                                  | return_fields                                                                                                                                                                                | null_case | comment                                                                 |
+-----------+-------------------+--------+-------+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+
| CPP       | plugin_manager.so |        |       | create_plugin                             | plugin_name:STRING, if_not_exist:BOOL                                                                                       |                                                                                                                                                                                              |           | create metadata for specified plugin                                    |
| CPP       | plugin_manager.so |        |       | drop_plugin                               | plugin_name:STRING, if exists:BOOL                                                                                          |                                                                                                                                                                                              |           | drop specified plugin and remove the metadata                           |
...
+-----------+-------------------+--------+-------+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+

Show a specific procedure

SHOW PROCEDURE show_queries

Return:

+-----------+---------+--------+-------+--------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-----------------------------+
| proc_type | module  | schema | owner | name         | parameters | return_fields                                                                                                                                                             | null_case | comment                     |
+-----------+---------+--------+-------+--------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-----------------------------+
| CPP       | dbms.so |        |       | show_queries |            | username:STRING, host:STRING, graph:STRING, session_id:INT64, query_id:STRING, query:STRING, start_time:ZONEDDATETIME, duration(ms):INT64, status:STRING, category:STRING |           | display the running queries |
+-----------+---------+--------+-------+--------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-----------------------------+

Show multiple procedures with a regular expression

SHOW PROCEDURE "show.*"

Return:

+-----------+---------+--------+-------+-------------------------------------------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+
| proc_type | module  | schema | owner | name                                      | parameters                  | return_fields                                                                                                                                                                                | null_case | comment                                                                 |
+-----------+---------+--------+-------+-------------------------------------------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+
| CPP       | dbms.so |        |       | show_current_session_time_formats         |                             | date_format:STRING, local_time_format:STRING, zoned_time_format:STRING, local_datetime_format:STRING, zoned_datetime_format:STRING                                                           |           | display all time formats of the current session                         |
| CPP       | dbms.so |        |       | show_services                             | service_type:STRING         | host:STRING, port:UINT32, status:STRING, service_type:STRING, git_info_sha:STRING, version:STRING                                                                                            |           | show services of specific type in this service group                    |
...
+-----------+---------+--------+-------+-------------------------------------------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------------------------------------------------------------------------+