TSSetToList function

The TSSetToList function takes a TimeSeries column and returns a list (collection of rows) containing all the elements in the time series. Null elements are not added to the list.

Syntax

TSSetToList(ts     TimeSeries)
returns list (row not null)
ts
The time series to act on.

Description

Because this aggregate function can return rows of any type, the return value must be explicitly cast at runtime.

Returns

A list (collection of rows).

Example

The following query collects all the elements in all the time series in the stock_data column into a list and then selects out the high column from each element.
select high from table((select 
   TsSetToList(stock_data)::list(stock_bar 
   not null) from daily_stocks));