Feature request #16708
Support Postgres Range Types
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||24607|
Range types are data types representing a range of values of some element type. For instance, ranges of timestamp might be used to represent the ranges of time that a meeting room is reserved.
Currently, these columns are ignored and cannot be viewed.
To make them usable in QGIS, it might be best to split the range into two columns (start and end).
#1 Updated by Nyall Dawson about 3 years ago
QGIS 3.0 has classes for ranges such as QgsDoubleRange, QgsIntRange, QgsDateTimeRange and QgsDateRange (also it's easy to add support for other range types)
This would be a matter of translating the Postgres range types across to these native QGIS ranges. It should be a lossless conversion (since I designed qgis ranges based off postgres ranges!).
The trickier bit is what you'd actually DO with these ranges when you have them in QGIS. For this we'd need to add expression functions which can extract parts of the range and perform tests like range intersects, contains, etc...
Anyway, better to keep it as a single field and use the native qgis range types to avoid confusion and to better follow the actual database structure.