TSRowNumToList function
The TSRowNumToList 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
TSRowNumToList(ts_row row,
colnum integer)
returns list (row not null)
- ts_row
- The time series to act on.
- colnum
- The number of the time series column to return.
Description
The TSRowNumToList function can only be used on rows with one TimeSeries column.
The column is specified by its number; column numbering starts at 1, with the first column following the time stamp 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 , name, and high columns.
select
TSRowNumToList(d, 1)::list(row
(id integer, name lvarchar, high real) not null)
from daily_stocks d;