TSColNameToList function
The TSColNameToList function takes a TimeSeries column and returns a list (collection of rows) containing the values of one of the columns in the elements of the time series. Null elements are not added to the list.
Syntax
TSColNameToList(ts TimeSeries,
colname lvarchar)
returns list
- ts
- The time series to act on.
- colname
- The column to return.
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
This query returns a list of all
values in the column high:
select * from table((select
TSColNameToList(stock_data, 'high')::list(real
not null) from daily_stocks));