MobilityDB  1.0
Functions
temporal_parser.c File Reference

Functions for parsing time types and temporal types. More...

#include "general/temporal_parser.h"
#include "general/periodset.h"
#include "general/period.h"
#include "general/timestampset.h"
#include "general/temporaltypes.h"
#include "general/temporal_util.h"
Include dependency graph for temporal_parser.c:

Functions

void p_whitespace (char **str)
 Input a white space from the buffer. More...
 
void ensure_end_input (char **str, bool end)
 Ensure there is no more input excepted white spaces. More...
 
bool p_obrace (char **str)
 Input an opening brace from the buffer. More...
 
bool p_cbrace (char **str)
 Input a closing brace from the buffer. More...
 
bool p_obracket (char **str)
 Input an opening bracket from the buffer. More...
 
bool p_cbracket (char **str)
 Input a closing bracket from the buffer. More...
 
bool p_oparen (char **str)
 Input an opening parenthesis from the buffer. More...
 
bool p_cparen (char **str)
 Input a closing parenthesis from the buffer. More...
 
bool p_comma (char **str)
 Input a comma from the buffer. More...
 
double double_parse (char **str)
 Input a double from the buffer. More...
 
Datum basetype_parse (char **str, Oid basetype)
 Parse a base value from the buffer. More...
 
TBOXtbox_parse (char **str)
 Parse a temporal box value from the buffer. More...
 
TimestampTz timestamp_parse (char **str)
 Parse a timestamp value from the buffer. More...
 
Periodperiod_parse (char **str, bool make)
 Parse a period value from the buffer. More...
 
TimestampSettimestampset_parse (char **str)
 Parse a timestamp set value from the buffer. More...
 
PeriodSetperiodset_parse (char **str)
 Parse a period set value from the buffer. More...
 
TInstanttinstant_parse (char **str, Oid basetype, bool end, bool make)
 Parse a temporal instant value from the buffer. More...
 
static TInstantSettinstantset_parse (char **str, Oid basetype)
 Parse a temporal instant set value from the buffer. More...
 
static TSequencetsequence_parse (char **str, Oid basetype, bool linear, bool end, bool make)
 Parse a temporal sequence value from the buffer. More...
 
static TSequenceSettsequenceset_parse (char **str, Oid basetype, bool linear)
 Parse a temporal sequence set value from the buffer. More...
 
Temporaltemporal_parse (char **str, Oid basetype)
 Parse a temporal value from the buffer (dispatch function) More...
 

Detailed Description

Functions for parsing time types and temporal types.

Many functions make two passes for parsing, the first one to obtain the number of elements in order to do memory allocation with palloc, the second one to create the type. This is the only approach we can see at the moment which is both correct and simple.