You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this awesome project, huge fan and user of pgrx!
Often when working with date-times and other temporal Postgres types, I often end up converting to chrono native types -- it would be nice if pgrx had a chrono feature flag that exposed some simple From/TryFrom/etc implementations.
I'd be willing to work on this if it was something ya'll would be willing to consider
The text was updated successfully, but these errors were encountered:
That seems reasonable, the only caveat I will note is that our current implementations for these datetime types don't adequately bound themselves in some cases, but I intend to fix that Somewhat Soon.
Postgres offers pretty generous limits but they do exist, and offers different precisions. This makes converting to/from Chrono types somewhat error prone. So I "most want" these in the case where there is
no precision loss when converted into the Postgres type
no out-of-bounds values when converted into Postgres type
Hey @workingjubilee I've got a draft PR of one conversion (pgrx::datum::Date -> chrono::NaiveDate) and would appreciate some early feedback if you can find some spare time!
These tests are certainly a good candidate for proptests, the test that's in there right now is just a simple static test -- I can certain make sure that these are proptested while I'm here.
Thanks for this awesome project, huge fan and user of
pgrx
!Often when working with date-times and other temporal Postgres types, I often end up converting to
chrono
native types -- it would be nice ifpgrx
had achrono
feature flag that exposed some simpleFrom
/TryFrom
/etc implementations.I'd be willing to work on this if it was something ya'll would be willing to consider
The text was updated successfully, but these errors were encountered: