Is there right way to get range types?
Or parse as String, and wait for native support...
For example tsrange:
["2010-01-01 14:00:00","2010-01-01 15:00:00"]
PG Range tupes - http://www.postgresql.org/docs/devel/static/rangetypes.html
To connect to the PostgreSQL database server from a Java program, you need to have PostgreSQL JDBC driver. You can download the latest version of the driver on the postgresql.org website via the download page.
Range types are a unique feature of PostgreSQL, managing two dimensions of data in a single column, and allowing advanced processing. The main example is the daterange data type, which stores as a single value a lower and an upper bound of the range as a single value.
You can use range functions in your query to create individual date columns.
select lower(some_range) as start, upper(some_range) as end ...
Then you can use ResultSet's getDate() method on the resulting columns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With