PostgreSQL analogies¶
This page describes range types, functions and operators in PostgreSQL, and what their Spans equivalents are.
Range types¶
Most range types included in Spans have an equivalent in PostgreSQL.
Postgresql type |
Python type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Does not exist [1] |
|
Does not exist |
Operators¶
Most operators are not overloaded in Python to their PostgreSQL equivalents. Instead Spans implements the functionality using methods.
Operator |
PostgreSQL |
Python |
---|---|---|
Equal |
|
|
Not equal |
|
|
Less than |
|
|
Greater than |
|
|
Less than or equal |
|
|
Greater than or equal |
|
|
Contains |
|
|
Is contained by |
|
|
Overlap |
|
|
Strictly left of |
|
|
Strictly right of |
|
|
Does not extend to the right of |
|
|
Does not extend to the left of |
|
|
Is adjacent to |
|
|
Union |
|
|
Intersection |
|
|
Difference |
|
|
Functions¶
There are no functions in Spans that operate on ranges. Instead they are implemented as methods, properties or very simple combinations.
PostgreSQL function |
Python equivalent |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|