Skip to content
ptrb edited this page May 29, 2013 · 1 revision

Name and Parameters

pt_temporal_bbox( PostTIME ) : PostTIME pt_temporal_bbox( SET of PostTIME ) : PostTIME

Description

Calculates the temporal bounding box, i.e. the temporal extent that is covered by the PostTIME instances used as arguments. This is an overloaded function, so you can use a single PostTIME instance or also SETs as arguments. It work's for all reference systems and types.

Examples

-- Use it with a single instant.
SELECT pt_temporal_bbox('2013-4-29T12:32');
-- result
'CAL0012013-04-29T12:32:00.000Z/2013-04-29T12:32:00.000Z'

-- Up to the regular types.
SELECT pt_temporal_bbox('R12/2013-4-29T8/PT8H30M/PT15H30M');
-- result
'CAL0012013-04-29T08:00:00.000Z/2013-05-11T16:30:00.000Z'

-- Or aggregate the temporal bbox directly from a table's attribute.
SELECT pt_temporal_bbox(foo_ptime_attribute) FROM foo_table;
-- result
'CAL0012012-09-03T16:33:22.212Z/2021-07-01T00:00:00.000Z'

-- And why not use it with ordinal systems?
SELECT pt_temporal_bbox('ORD001Triassic,Paleozoic,Mesozoic,Neogene');
-- result
'ORD001Paleozoic/Neogene'

Processable Objects

| CAL | TCS | ORD ---|---|---|--- TM_Instant | ✔ | ✔ | ✔ TM_Period | ✔ | ✔ |✔ MultiInstant | ✔ | ✔ |✔ MultiPeriod | ✔ | ✔ |✔ RegularMultiInstant | ✔ | ✔ | - RegularMultiPerid | ✔ | ✔ | - ✔ : Processable

✗ : Call will cause an error

∼ : Callable without error, but returns only a pseudo result

Related functions


List of SQL Functions