routines

The routines view provides information about all routines (functions and procedures).

Column name Data type Description
specific_catalog sql_identifier The name of the current database containing the function.
specific_schema sql_identifier The name of the schema containing the function.
specific_name sql_identifier The “specific name” of the function.
routine_catalog sql_identifier The name of the current database containing the function.
routine_schema sql_identifier The name of the schema containing the function.
routine_name sql_identifier The name of the function.
routine_type character_data The routine type.
The possible values are:
  • FUNCTION
  • PROCEDURE
module_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
module_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
module_name sql_identifier Applies to a feature that is not available in PostgreSQL.
udt_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
udt_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
udt_name sql_identifier Applies to a feature that is not available in PostgreSQL.
data_type character_data For built-in types, returns the data type of the function. For array types, the value is ARRAY. For user-defined types, the value is USER-DEFINED, and the actual type is identified by type_udt_name and associated columns.
character_maximum_length cardinal_number Not used for return types in PostgreSQL.
Always NULL.
character_octet_length cardinal_number Not used for return types in PostgreSQL.
Always NULL.
character_set_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
character_set_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
character_set_name sql_identifier Applies to a feature that is not available in PostgreSQL.
collation_catalog sql_identifier Not used for return types in PostgreSQL.
Always NULL.
collation_schema sql_identifier Not used for return types in PostgreSQL.
Always NULL.
collation_name sql_identifier Not used for return types in PostgreSQL.
Always NULL.
numeric_precision cardinal_number Not used for return types in PostgreSQL.
Always NULL.
numeric_precision_radix cardinal_number Not used for return types in PostgreSQL.
Always NULL.
numeric_scale cardinal_number Not used for return types in PostgreSQL.
Always NULL.
datetime_precision cardinal_number Not used for return types in PostgreSQL.
Always NULL.
interval_type character_data Not used for return types in PostgreSQL.
Always NULL.
interval_precision cardinal_number Not used for return types in PostgreSQL.
Always NULL.
type_udt_catalog sql_identifier The current database where the return type is defined.
NULL – For procedures.
type_udt_schema sql_identifier The schema in which the return type is defined.
NULL – For procedures.
type_udt_name sql_identifier The name of the return type.
NULL – For procedures.
scope_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
scope_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
scope_name sql_identifier Applies to a feature that is not available in PostgreSQL.
maximum_cardinality cardinal_number Always NULL.
Arrays in PostgreSQL have unlimited cardinality.
dtd_identifier sql_identifier An identifier for the data type descriptor.
routine_body character_data The routine body type.
The possible values are:
  • SQL – For SQL-language routines.
  • EXTERNAL – For routines implemented in other languages.
routine_definition character_data The source text of the function.
NULL – Not accessible to the current user.
external_name character_data The external C symbol name used when the routine is implemented as a C function.
NULL – For functions written in any other language.
external_language character_data The language used to implement the function.
parameter_style character_data Specifies the calling convention for routine parameters.
Always GENERAL.
is_deterministic yes_or_no Specifies whether the function is IMMUTABLE (YES) or not (NO).
sql_data_access character_data Specifies how the routine interacts with SQL data according to the SQL standard.
Always MODIFIES.
is_null_call yes_or_no Whether NULL arguments produce a NULL return value.
NULL – For procedures.
sql_path character_data Applies to a feature that is not available in PostgreSQL.
schema_level_routine yes_or_no Specifies whether the routine exists at the schema level.
Always YES.
max_dynamic_result_sets cardinal_number Applies to a feature that is not available in PostgreSQL.
is_user_defined_cast yes_or_no Applies to a feature that is not available in PostgreSQL.
is_implicitly_invocable yes_or_no Applies to a feature that is not available in PostgreSQL.
security_type character_data The security type.
The possible values are:
  • INVOKER
  • DEFINER
to_sql_specific_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
to_sql_specific_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
to_sql_specific_name sql_identifier Applies to a feature that is not available in PostgreSQL.
as_locator yes_or_no Applies to a feature that is not available in PostgreSQL.
created time_stamp Applies to a feature that is not available in PostgreSQL.
last_altered time_stamp Applies to a feature that is not available in PostgreSQL.
new_savepoint_level yes_or_no Applies to a feature that is not available in PostgreSQL.
is_udt_dependent yes_or_no Specifies whether the routine depends on a user-defined type (UDT).
Always NO.
result_cast_from_data_type character_data Applies to a feature that is not available in PostgreSQL.
result_cast_as_locator yes_or_no Applies to a feature that is not available in PostgreSQL.
result_cast_char_max_length cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_char_octet_length cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_char_set_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_char_set_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_char_set_name sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_collation_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_collation_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_collation_name sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_numeric_precision cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_numeric_precision_radix cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_numeric_scale cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_datetime_precision cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_interval_type character_data Applies to a feature that is not available in PostgreSQL.
result_cast_interval_precision cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_type_udt_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_type_udt_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_type_udt_name sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_scope_catalog sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_scope_schema sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_scope_name sql_identifier Applies to a feature that is not available in PostgreSQL.
result_cast_maximum_cardinality cardinal_number Applies to a feature that is not available in PostgreSQL.
result_cast_dtd_identifier sql_identifier Applies to a feature that is not available in PostgreSQL.