Tabla de contenidos
Y temporal
{boolean,tbool} & {boolean,tbool} → tbool
SELECT tbool '[true@2001-01-03, true@2001-01-05)' & tbool '[false@2001-01-03, false@2001-01-05)'; -- [f@2001-01-03, f@2001-01-05) SELECT tbool '[true@2001-01-03, true@2001-01-05)' & tbool '{[false@2001-01-03, false@2001-01-04), [true@2001-01-04, true@2001-01-05)}'; -- {[f@2001-01-03, t@2001-01-04, t@2001-01-05)}
O temporal
{boolean,tbool} | {boolean,tbool} → tbool
SELECT tbool '[true@2001-01-03, true@2001-01-05)' | tbool '[false@2001-01-03, false@2001-01-05)'; -- [t@2001-01-03, t@2001-01-05)
No temporal
~tbool → tbool
SELECT ~tbool '[true@2001-01-03, true@2001-01-05)'; -- [f@2001-01-03, f@2001-01-05)
Obtener el tiempo cuando el booleano temporal toma el valor verdadero
whenTrue(tbool) → tstzspanset
SELECT whenTrue(tfloat '[1@2001-01-01, 4@2001-01-04, 1@2001-01-07]' #> 2); -- {(2001-01-02, 2001-01-06)} SELECT whenTrue(tdwithin(tgeompoint '[Point(1 1)@2001-01-01, Point(4 4)@2001-01-04, Point(1 1)@2001-01-07]', geometry 'Point(1 1)', sqrt(2))); -- {[2001-01-01, 2001-01-02], [2001-01-06, 2001-01-07]}