How to get PostgreSQL range types via jdbc

前端 未结 1 452
Happy的楠姐
Happy的楠姐 2021-01-12 19:21

Is there right way to get range types?

Or parse as String, and wait for native support...

For example tsrange:

[\"2010-01-01         


        
1条回答
  •  北恋
    北恋 (楼主)
    2021-01-12 20:09

    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.

    0 讨论(0)
提交回复
热议问题