# Sys Schema Stored Functions

- [extract\_schema\_from\_file\_name](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/extract_schema_from_file_name.md): This function takes a file path and returns the schema name it belongs to, assuming the file is located within the schema's directory.
- [extract\_table\_from\_file\_name](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/extract_table_from_file_name.md): This function extracts and returns the table name from a given file path, determined solely by parsing the path string.
- [format\_bytes](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/sys_schema_format_bytes.md): Convert bytes to a human-readable string. This function formats a numeric byte count into units like KiB, MiB, GiB, up to EiB.
- [format\_path](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/format_path.md): The format\_path function replaces specific system paths in a given string with their corresponding system variable names for better readability.
- [format\_statement](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/format_statement.md): This function formats and truncates an SQL statement string to a specified length, making it suitable for display in summary views.
- [format\_time](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/format_time.md): The format\_time function converts a time value in picoseconds into a human-readable string with appropriate units (e.g., ms, s, min).
- [list\_add](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/list_add.md): This function appends a value to a comma-separated list of values, which is useful for modifying system variables that take list values.
- [list\_drop](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/list_drop.md): The list\_drop function removes a specified value from a comma-separated list, returning the modified list.
- [ps\_is\_account\_enabled](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_is_account_enabled.md): This function checks whether a specific user account is enabled for instrumentation in the Performance Schema setup\_actors table.
- [ps\_is\_consumer\_enabled](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_is_consumer_enabled.md): This function returns YES or NO indicating whether a specific consumer is currently enabled in the Performance Schema.
- [ps\_is\_instrument\_default\_enabled](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_is_instrument_default_enabled.md): This function checks if a given Performance Schema instrument is enabled by default, returning YES or NO.
- [ps\_is\_instrument\_default\_timed](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_is_instrument_default_timed.md): This function checks if a specific Performance Schema instrument is timed by default, returning YES or NO based on the server's default configuration.
- [ps\_is\_thread\_instrumented](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_is_thread_instrumented.md): The ps\_is\_thread\_instrumented function checks whether a specific thread ID is currently instrumented by the Performance Schema.
- [ps\_thread\_account](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_thread_account.md): This function returns the user account (username@hostname) associated with a specific Performance Schema thread ID.
- [ps\_thread\_id](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_thread_id.md): The ps\_thread\_id function returns the internal Performance Schema thread ID associated with a given connection ID.
- [ps\_thread\_stack](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_thread_stack.md): This function returns a JSON-formatted stack trace of all statements, stages, and events for a given thread, useful for deep diagnostics.
- [ps\_thread\_trx\_info](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/ps_thread_trx_info.md): The ps\_thread\_trx\_info function returns a JSON object detailing the current transaction and executed statements for a specific thread.
- [quote\_identifier](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/quote_identifier.md): This function quotes a given string with backticks to ensure it can be safely used as an identifier in SQL statements.
- [sys\_get\_config](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/sys_get_config.md): The sys\_get\_config function retrieves the value of a specified configuration option from the sys\_config table, or a user variable if set.
- [version\_major](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/version_major.md): This function returns the major version number of the MariaDB Server instance (e.g., 10 from 10.6.4).
- [version\_minor](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/version_minor.md): This function returns the minor version number of the MariaDB Server instance, such as the 6 in 10.6.4.
- [version\_patch](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/version_patch.md): This function returns the patch release version number of the MariaDB Server instance, such as the 4 in 10.6.4.
