Skip to main content
Skip to main content
Edit this page

system.documentation

Description

Collects the embedded documentation of the uniform components of the system into a single table. Every row corresponds to one entity (a function, a table engine, a data type, and so on) and contains the reference documentation of that entity rendered as Markdown — the same content that is published on the website and exposed by the per-kind system.* tables.

The description is assembled from the structured parts of the embedded documentation (description, syntax, arguments, examples, and so on), so a single column holds the complete documentation of an entity. Aliases are rendered as a short reference to the canonical entity, e.g. Alias of `trunc`.

This table, in a certain way, collects the information available in the per-kind documentation tables (system.functions, system.table_engines, system.data_type_families, and others). It is meant, in particular, to back an interactive help command in the client, but is useful on its own.

The following kinds of entities are collected (the value of the type column is shown in parentheses):

  • Functions (Function)
  • Aggregate functions (Aggregate Function)
  • Table functions (Table Function)
  • Table engines (Table Engine)
  • Database engines (Database Engine)
  • Data types (Data Type)
  • Dictionary layouts (Dictionary Layout)
  • Dictionary sources (Dictionary Source)
  • Aggregate function combinators (Aggregate Function Combinator)
  • Data skipping index types (Data Skipping Index)
  • Disk types (Disk Type)
  • Settings (Setting)
  • MergeTree settings (MergeTree Setting)
  • Server settings (Server Setting)
  • Formats (Format)
  • Compression codecs (Compression Codec)
  • Profile events (Profile Event)
  • Current metrics (Current Metric)
  • Asynchronous metrics (Asynchronous Metric)
  • System tables (System Table)

For settings (of any kind), the documentation is the setting's description, together with its type and default value; obsolete settings are not exposed. For system tables, the documentation is the table comment together with the list of its columns (the name, type and description of each).

The source column holds the path of the source file where the entity's documentation is defined, relative to the repository root. For most entities it is captured automatically at the place where the documentation object is constructed (the registration site of the component); for the kinds that are documented in a single source file each (such as settings, profile events and current metrics), it is that file.

Columns

Example

Read the documentation of a particular entity:

SELECT description
FROM system.documentation
WHERE type = 'Table Engine' AND name = 'MergeTree'
FORMAT TSVRaw;

The same name can refer to several kinds of entities (for example, there is both a file table function and a file dictionary source), so it is convenient to look a name up across all kinds:

SELECT type, name
FROM system.documentation
WHERE name = 'file'
ORDER BY type;

Count the documented entities of each kind:

SELECT type, count()
FROM system.documentation
GROUP BY type
ORDER BY count() DESC;

See also