#include "postgres.h"
#include <float.h>
#include <math.h>
#include "access/gist.h"
#include "access/skey.h"
#include "utils/builtins.h"
#include "lib/stringinfo.h"
#include "utils/array.h"
#include "tsdata.h"
Go to the source code of this file.
Defines | |
#define | ARRPTR(x) ( (double *) ARR_DATA_PTR(x) ) |
#define | ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x)) |
Functions | |
int | ts_yyparse () |
void | ts_yyerror (const char *message) |
int | ts_scanner_init (const char *str) |
void | ts_scanner_finish (void) |
void | i_ts_sax (TS *ts, int32 sax_len, SAX *result) |
internal TS to SAX converter. | |
unsigned char | to_base_sax (double val) |
bool | isNull (TS_ELEMENT *point) |
Check for NULL conditions in TS. | |
PG_FUNCTION_INFO_V1 (ts_in) | |
PG_FUNCTION_INFO_V1 (ts_out) | |
PG_FUNCTION_INFO_V1 (ts_length) | |
PG_FUNCTION_INFO_V1 (ts_duration) | |
PG_FUNCTION_INFO_V1 (ts_range) | |
PG_FUNCTION_INFO_V1 (ts_sax) | |
PG_FUNCTION_INFO_V1 (ts_mean) | |
PG_FUNCTION_INFO_V1 (ts_std) | |
PG_FUNCTION_INFO_V1 (ts_add) | |
PG_FUNCTION_INFO_V1 (ts_multiply) | |
PG_FUNCTION_INFO_V1 (ts_subtract) | |
PG_FUNCTION_INFO_V1 (ts_divide) | |
PG_FUNCTION_INFO_V1 (ts_subset) | |
Datum | ts_in (PG_FUNCTION_ARGS) |
Read string to time series. | |
Datum | ts_out (PG_FUNCTION_ARGS) |
Writes time series to string. | |
Datum | ts_length (PG_FUNCTION_ARGS) |
Return the length of the series. | |
Datum | ts_duration (PG_FUNCTION_ARGS) |
Return the duration of the series. | |
Datum | ts_range (PG_FUNCTION_ARGS) |
Return a TS consisting of one point representing the range of the input series. | |
Datum | ts_sax (PG_FUNCTION_ARGS) |
Return a SAX representing the input time series. | |
Datum | ts_mean (PG_FUNCTION_ARGS) |
Calculate average level for time series. | |
Datum | ts_std (PG_FUNCTION_ARGS) |
Standard deviation of time series. | |
Datum | ts_add (PG_FUNCTION_ARGS) |
Shift time series up to a certain amount. | |
Datum | ts_subtract (PG_FUNCTION_ARGS) |
Shift time series down to a certain amount. | |
Datum | ts_multiply (PG_FUNCTION_ARGS) |
Scale time series up to a certain amount. | |
Datum | ts_divide (PG_FUNCTION_ARGS) |
Scale time series down to a certain amount. | |
float | i_ts_mean (TS *ts) |
float | i_ts_std (TS *ts) |
void | ts_shift (TS *ts, float4 shift, TS *result) |
void | ts_scale (TS *ts, float4 scale, TS *result) |
void | i_ts_subset (TS *ts, int32 offset, TS *result) |
Datum | ts_subset (PG_FUNCTION_ARGS) |
extract subset of time series. | |
Variables | |
PG_MODULE_MAGIC |
#define ARRNELEMS | ( | x | ) | ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x)) |
bool isNull | ( | TS_ELEMENT * | point | ) |
PG_FUNCTION_INFO_V1 | ( | ts_subset | ) |
PG_FUNCTION_INFO_V1 | ( | ts_divide | ) |
PG_FUNCTION_INFO_V1 | ( | ts_subtract | ) |
PG_FUNCTION_INFO_V1 | ( | ts_multiply | ) |
PG_FUNCTION_INFO_V1 | ( | ts_add | ) |
PG_FUNCTION_INFO_V1 | ( | ts_std | ) |
PG_FUNCTION_INFO_V1 | ( | ts_mean | ) |
PG_FUNCTION_INFO_V1 | ( | ts_sax | ) |
PG_FUNCTION_INFO_V1 | ( | ts_range | ) |
PG_FUNCTION_INFO_V1 | ( | ts_duration | ) |
PG_FUNCTION_INFO_V1 | ( | ts_length | ) |
PG_FUNCTION_INFO_V1 | ( | ts_out | ) |
PG_FUNCTION_INFO_V1 | ( | ts_in | ) |
Datum ts_add | ( | PG_FUNCTION_ARGS | ) |
Datum ts_divide | ( | PG_FUNCTION_ARGS | ) |
Datum ts_duration | ( | PG_FUNCTION_ARGS | ) |
Datum ts_in | ( | PG_FUNCTION_ARGS | ) |
Datum ts_length | ( | PG_FUNCTION_ARGS | ) |
Datum ts_mean | ( | PG_FUNCTION_ARGS | ) |
Datum ts_multiply | ( | PG_FUNCTION_ARGS | ) |
Datum ts_out | ( | PG_FUNCTION_ARGS | ) |
Datum ts_range | ( | PG_FUNCTION_ARGS | ) |
Datum ts_sax | ( | PG_FUNCTION_ARGS | ) |
void ts_scanner_finish | ( | void | ) |
int ts_scanner_init | ( | const char * | str | ) |
Datum ts_std | ( | PG_FUNCTION_ARGS | ) |
Datum ts_subset | ( | PG_FUNCTION_ARGS | ) |
extract subset of time series.
It returns time series starts at offset and spanning length points. If offset is negative time series will be padded with NULL values in the beginning. If offset+length greater than length of original time series, result will be padded with NULL values at the end.
time | series to deal with | |
offset | ||
length |
Datum ts_subtract | ( | PG_FUNCTION_ARGS | ) |
void ts_yyerror | ( | const char * | message | ) |
int ts_yyparse | ( | ) |