可以使用时间系列 SQL 函数来装入个别元素或元素集。
update table_name set TimeSeries_col=FunctionName(TimeSeries_type, data) where col1='value';
TimeSeries_col 参数是时间系列所在列的名称。FunctionName 参数是函数的名称。data 参数的格式为行类型数据元素。WHERE 子句指定要更新表中的哪一行。
update daily_stocks set stock_data = PutElem(stock_data, row(NULL::datetime year to fraction(5), 2.3, 3.4, 5.6, 67)::stock_bar) where stock_name = 'GBase';
也可以使用更复杂的表达式来装入时间系列,例如,通过包含二进制算术函数来装入时间系列。