Devuelve el intervalo de valores ignorando las brechas potenciales
valueSpan(tnumber) → numspan
SELECT valueSpan(tint '{[1@2001-01-01, 1@2001-01-03), [4@2001-01-03, 6@2001-01-05]}'); -- [1,7) SELECT valueSpan(tfloat '{1@2001-01-01, 2@2001-01-03, 3@2001-01-05}'); -- [1,3])
Devuelve el conjunto de valores de un número temporal
valueSet(tnumber) → numset
SELECT valueSet(tint '[1@2001-01-01, 2@2001-01-03]'); -- {1, 2} SELECT valueSet(tfloat '{[1@2001-01-01, 2@2001-01-03), [3@2001-01-03, 4@2001-01-05)}'); -- {1, 2, 3, 4}
Return the minimum or maximum value
minValue(torder) → base
maxValue(torder) → base
The functions do not take into account whether the bounds are inclusive or not.
SELECT minValue(tfloat '{1@2001-01-01, 2@2001-01-03, 3@2001-01-05}'); -- 1 SELECT maxValue(tfloat '{[1@2001-01-01, 2@2001-01-03), [3@2001-01-03, 5@2001-01-05)}'); -- 5
Return the instant with the minimum or maximum value
minInstant(torder) → base
maxInstant(torder) → base
The function does not take into account whether the bounds are inclusive or not. If several instants have the minimum value, the first one is returned.
SELECT minInstant(tfloat '{1@2001-01-01, 2@2001-01-03, 3@2001-01-05}'); -- 1@2001-01-01 SELECT maxInstant(tfloat '{[1@2001-01-01, 2@2001-01-03), [3@2001-01-03, 5@2001-01-05)}'); -- 5@2001-01-05