InsSet 函数

InsSet 函数将给定集的每个元素都插入时间系列。

语法

InsSet(ts           TimeSeries, 
      multiset_rows multiset,
      flags        integer default 0) 
returns TimeSeries;
ts
要对其执行操作的时间系列。
multiset_rows
要存储在时间系列中的新行类型值的多集。
flags
flags 参数值中描述了 flags 参数的有效值。缺省值为 0

描述

提供的行类型值必须将时间戳记作为其第一个属性。此时间戳记用于确定在时间系列中执行插入的位置。例如,要插入到存储单个双精度值的时间系列,传递给 InsSet 的行类型值必须包含时间戳记和双精度值。

如果给定时间点已存在元素,那么整个插入无效并将出现错误。

不能在时间戳记上插入已隐藏的元素。

返回结果

已插入多集的时间系列。

示例

以下示例将 stock_trade 项目集插入时间系列:
update activity_stocks
set activity_data = (select InsSet(activity_data, set_data)
            from activity_load_tab where stock_id = 600)
where stock_id = 600;