Add information_schema.columns.extras

Fixes: #55183
This commit is contained in:
Robert Schulze 2023-10-03 13:11:03 +00:00
parent 2aefa760c3
commit 907e792a93
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 9 additions and 0 deletions

View File

@ -69,6 +69,7 @@ Columns:
- `domain_catalog` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`, not supported.
- `domain_schema` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`, not supported.
- `domain_name` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `NULL`, not supported.
- `extras` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — `STORED GENERATED` for `MATERIALIZED`-type columns, `VIRTUAL GENERATED` for `ALIAS`-type columns, `DEFAULT_GENERATED` for `DEFAULT`-type columns, or `NULL`.
**Example**

View File

@ -174,6 +174,7 @@ static constexpr std::string_view columns = R"(
`domain_catalog` Nullable(String),
`domain_schema` Nullable(String),
`domain_name` Nullable(String),
`extras` Nullable(String),
`column_comment` String,
`column_type` String,
`TABLE_CATALOG` String,
@ -199,6 +200,7 @@ static constexpr std::string_view columns = R"(
`DOMAIN_CATALOG` Nullable(String),
`DOMAIN_SCHEMA` Nullable(String),
`DOMAIN_NAME` Nullable(String),
`EXTRAS` Nullable(String),
`COLUMN_COMMENT` String,
`COLUMN_TYPE` String
) AS
@ -226,6 +228,11 @@ static constexpr std::string_view columns = R"(
NULL AS domain_catalog,
NULL AS domain_schema,
NULL AS domain_name,
multiIf(default_kind = 'DEFAULT', 'DEFAULT_GENERATED',
default_kind = 'MATERIALIZED', 'STORED GENERATED',
default_kind = 'ALIAS', 'VIRTUAL GENERATED',
''
) AS extras,
comment AS column_comment,
type AS column_type,
table_catalog AS TABLE_CATALOG,
@ -251,6 +258,7 @@ static constexpr std::string_view columns = R"(
domain_catalog AS DOMAIN_CATALOG,
domain_schema AS DOMAIN_SCHEMA,
domain_name AS DOMAIN_NAME,
extras AS EXTRAS,
column_comment AS COLUMN_COMMENT,
column_type AS COLUMN_TYPE
FROM system.columns