How to get PostgreSQL range types via jdbc

Is there a proper way to get range types?

Or parse as a 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

+5
source share
1 answer

You can use range functions in your query to create separate date columns.

 select lower(some_range) as start, upper(some_range) as end ... 

Then you can use the ResultSet getDate () method in the resulting columns.

+2
source

Source: https://habr.com/ru/post/1209331/


All Articles