16.1. Создание столбца аналитической таблицы #
Столбец аналитической таблицы можно создать с помощью команды ALTER TABLE с предложением ADD COLUMN.
Перед созданием столбца создайте аналитическую таблицу.
Требуемые права: суперпользователь или администратор Postgres Pro AXE со следующими правами:
владение аналитической таблицей;
право
USAGEна схемуduckdb;право
SELECTна служебную таблицуduckdb.tables.
За подробной информацией об управлении доступом обратитесь к Главе 12.
Выполните следующую команду на сервере Postgres Pro AXE:
ALTER TABLEимя_таблицыADD COLUMNимя_столбцатип_данных;
Где:
имя_таблицы: имя аналитической таблицы, в которой требуется создать столбец.имя_столбцаитип_данных: уникальное имя и тип данных столбца аналитической таблицы, который требуется создать. За подробной информацией о поддерживаемых типах данных обратитесь к Разделу D.2.
Пример 16.1. Создание столбца аналитической таблицы
ALTER TABLE axe_table ADD COLUMN status TEXT;
16.1. Creating an Analytical Table Column #
You can create an analytical table column using the ALTER TABLE command with the ADD COLUMN clause.
Before creating a column, create an analytical table.
Required privileges: Superuser or the Postgres Pro AXE administrator with the following privileges:
ownership of the analytical table
the
USAGEprivilege on theduckdbschemathe
SELECTprivilege on theduckdb.tablesservice table
For more information about access management, refer to Chapter 12.
Execute the following command on the Postgres Pro AXE server:
ALTER TABLEtable_nameADD COLUMNcolumn_namedata_type;
Where:
table_name: The name of the analytical table where the column must be created.column_nameanddata_type: The unique name and data type of the analytical table column that must be created. For more information about supported data types, refer to Section D.2.
Example 16.1. Creating an Analytical Table Column
ALTER TABLE axe_table ADD COLUMN status TEXT;