Using the latest r2d2_postgres crate, I need to read intervals from Postgres 13. When I send the following query:
SELECT '1 year 2 month 3 week 4 day 5 hour 6 minute 7.123456789 second'::interval
These bytes are returned in a vector:
[0, 0, 0, 4, 70, 196, 16, 1, 0, 0, 0, 25, 0, 0, 0, 14]
How to parse these?
I know of the pg_interval crate, but the from_sql method seems to take a string slice instead of a u8 vector.