Skip to content

List of SQL Functions

ptrb edited this page May 28, 2013 · 12 revisions

Basic Functions

Casts and Constructors

Creating posttime-objects.

  • posttime - This function allows casts from various types.
  • posttime_in - Input function for the PostTIME-type (c.f. the PostgreSQL-documentation).

ISO19108 Functions

The following functions are taken over from ISO19108 - for that reason these are only defined for the primitive object types. However, if you call one of these with a multi object you will get 'NAP' if the return type is text or '-1' if the return type is numeric. That means you can call these functions with any PostTIME instance without causing an error.

  • tm_relative_position - Determine the position of one object relative to another.
  • tm_distance - Find the duration between two objects and return as ISO8601-duration.
  • tm_distance_dec_day - Same as tm_distance, but returns the result in decimal days.
  • tm_duration - Calculates an instance's duration as ISO8601-duration.
  • tm_duration_dec_day - The instance's duration in decimal days.

Boolean functions

Determine if some assumption about an instance's state is true or false.

  • pt_simultaneous - Two objects share at least one simultaneous point in time.
  • pt_simultaneous_excluded_end_instants - Quite similar to simultaneous, but excluding consecutive periods.
  • pt_overlaps - Two objects share at least one simultaneous period of time.

Accessing Functions

Returning information about a distinct point of interest.

  • pt_temporal_bbox - Determine the covered period of time for one or more objects.
  • pt_weekday_int - Returns the weekday of an instant.

Transforming Functions

Changes an object and returns the new instance or instances.

  • pt_transform_system - Transform an instant to another reference system.
  • pt_regular_multi_to_multi - Get a MultiObject from a RegularMultiObject.

Spatio-temporal Functions

Utilizing PostTIME as well as PostGIS.

  • pt_predecessor - True if one geometry-time tuple is the predecessor of another.
  • pt_successor - Antagonist of pt_predecessor.
  • pt_spatiotemporal_statistics - Counting the occurrence of some event-objects relative to a static reference geometry in a histogram-manner.