![]() The functions lower_inf and upper_inf test for infinite lower and upper bounds of a range, respectively. For example, with timestamp ranges, include it, as does. You can think of these missing values as +/-infinity, but they are special range type values and are considered to be beyond any range element type's +/-infinity values.Įlement types that have the notion of “ infinity” can use them as explicit bound values. Specifying a missing bound as inclusive is automatically converted to exclusive, e.g., is converted to (,). ![]() If both lower and upper bounds are omitted, all values of the element type are considered to be in the range. Likewise, if the upper bound of the range is omitted, then all values greater than the lower bound are included in the range. The lower bound of a range can be omitted, meaning that all values less than the upper bound are included in the range, e.g., (,3]. Most range operators also work on multiranges, and they have a few functions of their own. A multirange is an ordered list of non-contiguous, non-empty, non-null ranges. The use of time and date ranges for scheduling purposes is the clearest example but price ranges, measurement ranges from an instrument, and so forth can also be useful.Įvery range type has a corresponding multirange type. Range types are useful because they represent many element values in a single range value, and because concepts such as overlapping ranges can be expressed clearly. The subtype must have a total order so that it is well-defined whether element values are within, before, or after a range of values. In this case the data type is tsrange (short for “ timestamp range”), and timestamp is the subtype. For instance, ranges of timestamp might be used to represent the ranges of time that a meeting room is reserved. Range types are data types representing a range of values of some element type (called the range's subtype). Constructing Ranges and Multiranges 8.17.7. Built-in Range and Multirange Types 8.17.2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |