SHOW-FUNCTIONS

Name

SHOW FUNCTIONS

Description

View all custom (system-provided) functions under the database. If the user specifies a database, then view the corresponding database, otherwise directly query the database where the current session is located

Requires SHOW permission on this database

grammar

  1. SHOW [FULL] [BUILTIN] FUNCTIONS [IN|FROM db] [LIKE 'function_pattern']

Parameters

full: Indicates the detailed information of the display function builtin: Indicates the functions provided by the display system db: database name to query function_pattern: parameter used to filter function names

grammar

  1. SHOW GLOBAL [FULL] FUNCTIONS [LIKE 'function_pattern']

Parameters

global: Indicates it means that the show function is a global function full: Indicates the detailed information of the display function function_pattern: parameter used to filter function names

Note: the “global” keyword is only available after v2.0

Example

  1. mysql> show full functions in testDb\G
  2. **************************** 1. row ******************** ******
  3. Signature: my_add(INT,INT)
  4. Return Type: INT
  5. Function Type: Scalar
  6. Intermediate Type: NULL
  7. Properties: {"symbol":"_ZN9doris_udf6AddUdfEPNS_15FunctionContextERKNS_6IntValES4_","object_file":"http://host:port/libudfsample.so","md5":"cfe7a362d10f3aaf6c49974ee0f1f878"}
  8. **************************** 2. row ******************** ******
  9. Signature: my_count(BIGINT)
  10. Return Type: BIGINT
  11. Function Type: Aggregate
  12. Intermediate Type: NULL
  13. Properties: { "object_file": "http: // host: port / libudasample.so", "finalize_fn": "_ZN9doris_udf13CountFinalizeEPNS_15FunctionContextERKNS_9BigIntValE", "init_fn": "_ZN9doris_udf9CountInitEPNS_15FunctionContextEPNS_9BigIntValE", "merge_fn": "_ZN9doris_udf10CountMergeEPNS_15FunctionContextERKNS_9BigIntValEPS2_", "md5": " 37d185f80f95569e2676da3d5b5b9d2f","update_fn":"_ZN9doris_udf11CountUpdateEPNS_15FunctionContextERKNS_6IntValEPNS_9BigIntValE"}
  14. **************************** 3. row ******************** ******
  15. Signature: id_masking(BIGINT)
  16. Return Type: VARCHAR
  17. Function Type: Alias
  18. Intermediate Type: NULL
  19. Properties: {"parameter":"id","origin_function":"concat(left(`id`, 3), `****`, right(`id`, 4))"}
  20. 3 rows in set (0.00 sec)
  21. mysql> show builtin functions in testDb like 'year%';
  22. +---------------+
  23. | Function Name |
  24. +---------------+
  25. | year |
  26. | years_add |
  27. | years_diff |
  28. | years_sub |
  29. +---------------+
  30. 2 rows in set (0.00 sec)
  31. mysql> show global full functions\G;
  32. *************************** 1. row ***************************
  33. Signature: decimal(ALL, INT, INT)
  34. Return Type: VARCHAR
  35. Function Type: Alias
  36. Intermediate Type: NULL
  37. Properties: {"parameter":"col, precision, scale","origin_function":"CAST(`col` AS decimal(`precision`, `scale`))"}
  38. *************************** 2. row ***************************
  39. Signature: id_masking(BIGINT)
  40. Return Type: VARCHAR
  41. Function Type: Alias
  42. Intermediate Type: NULL
  43. Properties: {"parameter":"id","origin_function":"concat(left(`id`, 3), `****`, right(`id`, 4))"}
  44. 2 rows in set (0.00 sec)
  45. mysql> show global functions ;
  46. +---------------+
  47. | Function Name |
  48. +---------------+
  49. | decimal |
  50. | id_masking |
  51. +---------------+
  52. 2 rows in set (0.00 sec)

Keywords

  1. SHOW, FUNCTIONS

Best Practice