Comparaciones tradicionales
tcbuffer {=, <>, <, >, <=, >=} tcbuffer → boolean
SELECT tcbuffer '{[Cbuffer(Point(1 1), 0.1)@2001-01-01,
Cbuffer(Point(1 1), 0.3)@2001-01-02),
[Cbuffer(Point(1 1), 0.3)@2001-01-02, Cbuffer(Point(1 1), 0.5)@2001-01-03]}' =
tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03]';
-- true
SELECT tcbuffer '{[Cbuffer(Point(1 1), 0.1)@2001-01-01,
Cbuffer(Point(1 1), 0.5)@2001-01-03]}' <>
tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03]';
-- false
SELECT tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01,
Cbuffer(Point(1 1), 0.5)@2001-01-03]' <
tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.6)@2001-01-03]';
-- false
Comparaciones alguna vez y siempre
{tcbuffer,cbuffer} {?=, ?<>, %=, %<>} {tcbuffer,cbuffer} → boolean
SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.4)@2001-01-03)' ?= cbuffer 'Cbuffer(Point(1 1), 0.3)'; -- true SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.4)@2001-01-03)' ?= tcbuffer '[Cbuffer(Point(1 1), 0.4)@2001-01-01, Cbuffer(Point(1 1), 0.2)@2001-01-03)'; -- true SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.2)@2001-01-04)' %= cbuffer 'Cbuffer(Point(1 1), 0.2)'; -- true
Superposición alguna vez y siempre
tcbuffer {?&&, %&&} stbox → boolean
stbox {?&&, %&&} tcbuffer → boolean
tcbuffer {?&&, %&&} tcbuffer → boolean
Si el valor está en un cuadro espaciotemporal en algún instante, o en todo instante en que está definido, tal como lo establecen ?&& y %&& para las geometrías temporales; un búfer circular está en un cuadro cuando lo interseca, tal como lo lee la restricción de un búfer circular temporal a un cuadro. Dos valores se superponen donde los cuadros de sus búferes circulares se superponen en un instante que comparten, es decir, donde la mayor de las distancias de sus centros según x e y es como máximo la suma de sus radios; los cuadros se comparan también entre los instantes de los valores, donde dos búferes en movimiento pueden superponerse solo por un momento, y dos valores que no comparten ningún instante responden NULL.
SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01 00:00, Cbuffer(Point(10 10), 1)@2001-01-01 10:00]' ?&& stbox 'STBOX XT(((8,0),(10,2)),[2001-01-01 00:00, 2001-01-01 10:00])'; -- false SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01 00:00, Cbuffer(Point(10 10), 1)@2001-01-01 10:00]' && stbox 'STBOX XT(((8,0),(10,2)),[2001-01-01 00:00, 2001-01-01 10:00])'; -- true SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01 00:00, Cbuffer(Point(10 10), 1)@2001-01-01 10:00]' ?&& stbox 'STBOX XT(((4,4),(6,6)),[2001-01-01 04:00, 2001-01-01 06:00])'; -- true SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01 00:00, Cbuffer(Point(10 10), 1)@2001-01-01 10:00]' %&& stbox 'STBOX X((-1,-1),(11,11))'; -- true SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01, Cbuffer(Point(10 0), 1)@2001-01-03]' ?&& tcbuffer '[Cbuffer(Point(10 0), 1)@2001-01-01, Cbuffer(Point(0 0), 1)@2001-01-03]'; -- true SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01, Cbuffer(Point(0 0), 1)@2001-01-03]' ?&& tcbuffer '[Cbuffer(Point(2.5 -6), 1)@2001-01-01, Cbuffer(Point(2.5 6), 1)@2001-01-03]'; -- false SELECT tcbuffer '[Cbuffer(Point(0 0), 1)@2001-01-01, Cbuffer(Point(0 0), 1)@2001-01-03]' %&& tcbuffer '[Cbuffer(Point(2 0), 1)@2001-01-01, Cbuffer(Point(6 0), 1)@2001-01-02, Cbuffer(Point(2 0), 1)@2001-01-03]'; -- false
Comparaciones temporales
{tcbuffer,cbuffer} {#=, #<>} {tcbuffer,cbuffer} → tbool
SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01,
Cbuffer(Point(1 1), 0.4)@2001-01-03)' #= cbuffer 'Cbuffer(Point(1 1), 0.3)';
-- {[f@2001-01-01, t@2001-01-02], (f@2001-01-02, f@2001-01-03)}
SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01,
Cbuffer(Point(1 1), 0.8)@2001-01-03)' #<>
tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.7)@2001-01-03)';
-- {[t@2001-01-01, f@2001-01-02], (t@2001-01-02, t@2001-01-03)}