The view information_schema.parameters contains information about all input
arguments of functions and procedures and output result columns of functions in the database.
Use condition is_result = 'NO'
to retrieve only the input arguments.
Use condition is_result = 'YES'
to retrieve only the output result columns.
Note that table producing functions can have more than one output result column.
Note that MonetDB supports function and procedure overloading (same name but with different arguments).
Use the specific_name
instead of function_name
to distinguish them.
SELECT * FROM information_schema.parameters;
SELECT * FROM information_schema.parameters WHERE is_result = 'NO';
SELECT * FROM information_schema.parameters WHERE is_result = 'YES';
SELECT specific_schema, function_name, specific_name, is_result, ordinal_position, parameter_mode, parameter_name, data_type
FROM information_schema.parameters WHERE NOT is_system;
information_schema.parameters
column name | type | remarks |
---|---|---|
specific_catalog | VARCHAR | Always NULL |
specific_schema | VARCHAR | |
specific_name | VARCHAR | Currently consists of function_name and function_id between ( and ) |
ordinal_position | INTEGER | |
parameter_mode | VARCHAR | IN or OUT |
is_result | VARCHAR | NO or YES |
as_locator | VARCHAR | Always NULL |
parameter_name | VARCHAR | |
from_sql_specific_catalog | VARCHAR | Always NULL |
from_sql_specific_schema | VARCHAR | Always NULL |
from_sql_specific_name | VARCHAR | Always NULL |
to_sql_specific_catalog | VARCHAR | Always NULL |
to_sql_specific_schema | VARCHAR | Always NULL |
to_sql_specific_name | VARCHAR | Always NULL |
data_type | VARCHAR | |
character_maximum_length | INTEGER | |
character_octet_length | BIGINT | |
character_set_catalog | VARCHAR | Always NULL |
character_set_schema | VARCHAR | Always NULL |
character_set_name | VARCHAR | |
collation_catalog | VARCHAR | Always NULL |
collation_schema | VARCHAR | Always NULL |
collation_name | VARCHAR | Always NULL |
numeric_precision | INTEGER | |
numeric_precision_radix | INTEGER | |
numeric_scale | INTEGER | |
datetime_precision | INTEGER | |
interval_type | VARCHAR | |
interval_precision | INTEGER | |
udt_catalog | VARCHAR | Always NULL |
udt_schema | VARCHAR | Always NULL |
udt_name | VARCHAR | Always NULL |
scope_catalog | VARCHAR | Always NULL |
scope_schema | VARCHAR | Always NULL |
scope_name | VARCHAR | Always NULL |
maximum_cardinality | INTEGER | Always NULL |
dtd_identifier | VARCHAR | Always NULL |
declared_data_type | VARCHAR | Always NULL |
declared_numeric_precision | INTEGER | Always NULL |
declared_numeric_scale | INTEGER | Always NULL |
parameter_default | VARCHAR | Always NULL |
schema_id | INTEGER | reference to sys.schemas.id |
function_id | INTEGER | reference to sys.functions.id |
arg_id | INTEGER | reference to sys.args.id |
function_name | VARCHAR | also known as routine_name |
function_type | INTEGER | reference to sys.function_types.function_type_id |
is_system | BOOLEAN | true when it is a parameter of a system function or procedure, else false |
Note: The last 6 columns (schema_id, function_id, arg_id, function_name, function_type and is_system) are extensions to the view as defined by ISO standard. They provide useful information and simplify filtering and joins with system tables/views in sys schema when needed.