rom-sql
rom-sql copied to clipboard
Support for interval PG types
It's probably will be tricky because PG has 5 formats for input and 4 for output, or something like that. https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-INTERVAL-INPUT
Do we want this in 1.x or 2.0?
@v-kolesnikov are you still working on this one? I like to give it a try
Hi @GustavoCaso ! No, I am not. I have worked on other issue https://github.com/rom-rb/rom-sql/issues/234 and my reference to current issue probably was a typo.
gordon=# select interval '2 days 23:12';
interval
-----------------
2 days 23:12:00
(1 row)
gordon=# select interval '2 days 23';
interval
-----------------
2 days 00:00:23
(1 row)
gordon=# select interval '2 days 23:';
interval
-----------------
2 days 23:00:00
(1 row)
gordon=# select interval '2 days 23:second:year:day';
interval
-----------------
2 days 23:00:00
(1 row)
postgres, what are you doing, stop!