#include "postgres.h"
#include <string.h>
#include <float.h>
#include <math.h>
#include "access/gist.h"
#include "access/skey.h"
#include "utils/builtins.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 | sax_yyparse () |
void | sax_yyerror (const char *message) |
int | sax_scanner_init (const char *str) |
void | sax_scanner_finish (void) |
bool | sax_isNull (SAX_ELEMENT *point) |
Check for NULL conditions. | |
PG_FUNCTION_INFO_V1 (sax_in) | |
PG_FUNCTION_INFO_V1 (sax_out) | |
PG_FUNCTION_INFO_V1 (sax_length) | |
PG_FUNCTION_INFO_V1 (sax_points_per_letter) | |
PG_FUNCTION_INFO_V1 (sax_range) | |
PG_FUNCTION_INFO_V1 (sax_upper) | |
PG_FUNCTION_INFO_V1 (sax_lower) | |
PG_FUNCTION_INFO_V1 (sax_string) | |
PG_FUNCTION_INFO_V1 (sax_subset) | |
Datum | sax_in (PG_FUNCTION_ARGS) |
PgSQL wrapper for string to SAX conversion. | |
Datum | sax_out (PG_FUNCTION_ARGS) |
Output SAX to string. | |
Datum | sax_length (PG_FUNCTION_ARGS) |
Return the length of the series. | |
Datum | sax_points_per_letter (PG_FUNCTION_ARGS) |
Return the points per letter of the series. | |
Datum | sax_range (PG_FUNCTION_ARGS) |
Return a SAX consisting of one point representing the range of the input series. | |
Datum | sax_upper (PG_FUNCTION_ARGS) |
Return a SAX consisting of point representing upper boundary of the input series. | |
Datum | sax_lower (PG_FUNCTION_ARGS) |
Datum | sax_string (PG_FUNCTION_ARGS) |
PgSQL wrapper for SAX to easy-to-read string conversion. | |
SAX * | i_sax_upper (SAX *sax) |
SAX * | i_sax_lower (SAX *sax) |
SAX * | i_sax_in (char *str) |
String to SAX conversion. | |
StringInfo | i_sax_string (SAX *sax) |
void | i_sax_subset (SAX *sax, int32 offset, SAX *result) |
Datum | sax_subset (PG_FUNCTION_ARGS) |
extract subset of SAX string. | |
float | dist (unsigned char a, unsigned char b, unsigned char c) |
unsigned char | promoteLetter (unsigned char let, unsigned char ref, unsigned char oldA, unsigned char newA) |
New cardinality is greater than old one. | |
unsigned char | downgradeLetter (unsigned char let, unsigned char oldA, unsigned char newA) |
New cardinality is less then old one. | |
unsigned char | changeLetterCardinality (unsigned char let, unsigned char oldA, unsigned char newA) |
Variables | |
int | sax_yydebug |
#define ARRNELEMS | ( | x | ) | ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x)) |
unsigned char changeLetterCardinality | ( | unsigned char | let, | |
unsigned char | oldA, | |||
unsigned char | newA | |||
) |
float dist | ( | unsigned char | a, | |
unsigned char | b, | |||
unsigned char | c | |||
) |
unsigned char downgradeLetter | ( | unsigned char | let, | |
unsigned char | oldA, | |||
unsigned char | newA | |||
) |
SAX* i_sax_in | ( | char * | str | ) |
PG_FUNCTION_INFO_V1 | ( | sax_subset | ) |
PG_FUNCTION_INFO_V1 | ( | sax_string | ) |
PG_FUNCTION_INFO_V1 | ( | sax_lower | ) |
PG_FUNCTION_INFO_V1 | ( | sax_upper | ) |
PG_FUNCTION_INFO_V1 | ( | sax_range | ) |
PG_FUNCTION_INFO_V1 | ( | sax_points_per_letter | ) |
PG_FUNCTION_INFO_V1 | ( | sax_length | ) |
PG_FUNCTION_INFO_V1 | ( | sax_out | ) |
PG_FUNCTION_INFO_V1 | ( | sax_in | ) |
unsigned char promoteLetter | ( | unsigned char | let, | |
unsigned char | ref, | |||
unsigned char | oldA, | |||
unsigned char | newA | |||
) |
Datum sax_in | ( | PG_FUNCTION_ARGS | ) |
PgSQL wrapper for string to SAX conversion.
Main function for object type. It accept strings in form :
SAX = 'lower:upper|card;lower:upper;... lower:; ... :upper; ... :/num_per_letter'
structure | with compressed internal parameters |
bool sax_isNull | ( | SAX_ELEMENT * | point | ) |
Datum sax_length | ( | PG_FUNCTION_ARGS | ) |
Datum sax_out | ( | PG_FUNCTION_ARGS | ) |
Datum sax_points_per_letter | ( | PG_FUNCTION_ARGS | ) |
Datum sax_range | ( | PG_FUNCTION_ARGS | ) |
void sax_scanner_finish | ( | void | ) |
int sax_scanner_init | ( | const char * | str | ) |
Datum sax_string | ( | PG_FUNCTION_ARGS | ) |
PgSQL wrapper for SAX to easy-to-read string conversion.
It generates string like:
SAX = 'ABCD|C:D|EF09/num_per_letter'
sax | SAX structure to convert |
Datum sax_subset | ( | PG_FUNCTION_ARGS | ) |
extract subset of SAX string.
It returns SAX string starts at offset and spanning length points. If offset is negative SAX string will be padded with NULL values in the beginning. If offset+length greater than length of original SAX string, result will be padded with NULL values at the end.
SAX | string to deal with | |
offset | ||
length |
Datum sax_upper | ( | PG_FUNCTION_ARGS | ) |
void sax_yyerror | ( | const char * | message | ) |
int sax_yyparse | ( | ) |
int sax_yydebug |