Alter a hypertable
You can alter a hypertable, for example to add a column, by using a standard ALTER TABLE command. This works for both regular and distributed hypertables.
In the following example, the hypertable is named conditions
and the new column is named humidity
:
ALTER TABLE conditions
ADD COLUMN humidity DOUBLE PRECISION NULL;
note
Adding a column is efficient so long as you set its default value to NULL
. If you set the default to a non-null value, it takes longer, because TimescaleDB needs to fill in this value for all existing rows of all existing chunks.
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .