Validity of Temporal Types

Values of temporal types must satisfy several constraints so that they are well defined. These constraints are given next.

An error is raised whenever one of these constraints are not satisfied. Examples of incorrect temporal values are as follows.

-- incorrect value for base type
SELECT tbool '1.5@2001-01-01 08:00:00';
-- base type is not a point
SELECT tgeompoint 'Linestring(0 0,1 1)@2001-01-01 08:05:00';
-- incorrect timestamp
SELECT tint '2@2001-02-31 08:00:00';
-- empty sequence
SELECT tint '';
-- incorrect bounds for instantaneous sequence
SELECT tint '[1@2001-01-01 09:00:00)';
-- duplicate timestamps
SELECT tint '[1@2001-01-01 08:00:00, 2@2001-01-01 08:00:00]';
-- unordered timestamps
SELECT tint '[1@2001-01-01 08:10:00, 2@2001-01-01 08:00:00]';
-- incorrect end value
SELECT tint '[1@2001-01-01 08:00:00, 2@2001-01-01 08:10:00)';
-- empty temporal sequence set value
SELECT tints(ARRAY[]);
-- duplicate timestamps
SELECT tinti(ARRAY[tint '1@2001-01-01 08:00:00', '2@2001-01-01 08:00:00']);
-- overlapping periods
SELECT tints(ARRAY[tint '[1@2001-01-01 08:00:00, 1@2001-01-01 10:00:00)',
'[2@2001-01-01 09:00:00, 2@2001-01-01 11:00:00)']);