TSRowNameToList function

The TSRowNameToList function returns a list (collection of rows) containing one individual column from a time series column plus the non-time-series columns of a table. Null elements are not added to the list.

Syntax

TSRowNameToList(ts_row     row,
                colname     lvarchar)
returns list (row not null)
ts_row
The time series to act on.
colname
The time series column to return.

Description

The TSRowNameToList function can only be used on rows with one TimeSeries column.

You must cast the return variable to match the names and types of the columns being returned exactly.

Returns

A list (collection of rows).

Example

The query returns a list of rows, each containing the ID and high columns.
select 
   TSRowNameToList(d, 'high')::list(
               row(id integer, name lvarchar, high real) not null) 
   from daily_stocks d;