Line segment and floating-point interval data type for PostgreSQL
seg
extension provides support for representing line segments or floating-point intervals in PostgreSQL.
This type represents both ranges of values and also measurements with uncertainty, randomness or tolerances.
Your Nile database arrives with the seg extension already enabled.
seg
that can represent:
< x
or > x
notationseg
data type accepts several input formats:
Format | Example | Description |
---|---|---|
x | 5.0 | Single value, a point |
x .. y | 1.0 .. 2.0 | Interval from x to y |
x .. | 1.0 .. | Everything greater than x |
.. y | .. 2.0 | Everything less than y |
<x | <5.0 | A point at X. < is preserved as a comment |
>x | >5.0 | A point at X. > is preserved as a comment |
~x | ~5.0 | A point at X. ~ is preserved as a comment |
x(+-)d | 5.0(+-)0.1 | Interval from x-d to x+d |
<<
(strictly left of)>>
(strictly right of)&<
(does not extend right of)&>
(does not extend left of)&&
(overlaps)@>
(contains)<@
(contained in)