A temporal circular buffer value can be converted to and from a temporal geometry point. This can be done using an explicit CAST
or using the ::
notation. A null value is returned if any of the composing geometry point values cannot be converted into a cbuffer
value.
Convert a temporal circular buffer to a temporal geometry point
tcbuffer::tgeompoint
SELECT asText((tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.3)@2001-01-02)')::tgeompoint); -- [POINT(1 1)@2001-01-01, POINT(1 1)@2001-01-02)
Convert a temporal circular buffer to a temporal float
tcbuffer::tfloat
SELECT (tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.3)@2001-01-02)')::tfloat; -- [0.2@2001-01-01, 0.3@2001-01-02)
We give next the functions and operators for circular buffer types.