HomeMogDBMogDB StackUqbar

Documentation:v2.0

Supported Versions:

ALTER TIMESERIES TABLE

Function

Users are allowed to modify the column name, the default value of a column, the data retention policy, and the owner of a time-series table. Additionally, the tablespace to which a time-series table belongs can be configured.

Precautions

  • It is impossible to modify options other than those explicitly supported by the syntax.
  • Only modifiable options can be modified.
  • Only one option can be modified at a time.
  • Time-series table does not support renaming. If you execute renaming, an error will be reported.

Syntax Format

Modify a time-series table.

ALTER TIMESERIES TABLE [ IF EXISTS ] tablename_name actions
  • action includes:

    | column_clause
    | ALTER POLICY TO policy_name
    | OWNER TO new_owner 
    | SET SCHEMA new_schema
  • column_clause includes:

    | RENAME [ COLUMN ] column_name TO new_column_name
    | ALTER [ COLUMN ] column_name { SET DEFAULT expression | DROP DEFAULT }

Parameter Description

  • table_name

    Specifies the name of a time-series table.

  • policy_name

    Specifies the policy name of a time-series table. The system creates a default policy for each database. Users can also set a policy as the default one. If no policy is specified during time-series table creation, the default retention policy of the database to which the time-series table belongs is used.

  • new_owner

    Specifies the owner of a time-series table.

  • new_schema

    Specifies the schema to which a time-series table belongs.

Examples

--Modify the owner of a time-series table to user1. 
Uqbar=#ALTER TIMESERIES TABLE weather owner TO user1;
ALTER TIMESERIES TABLE

CREATE TIMESERIES TABLE, DROP TIMESERIES TABLE

Copyright © 2011-2024 www.enmotech.com All rights reserved.