add postgres faithful/raw model for intervals#26
Open
eratio08 wants to merge 1 commit intotsloughter:mainfrom
Open
add postgres faithful/raw model for intervals#26eratio08 wants to merge 1 commit intotsloughter:mainfrom
eratio08 wants to merge 1 commit intotsloughter:mainfrom
Conversation
Add interval_config option following the established pg_types config
pattern (like timestamp_config, uuid_format). When set to raw, decode
returns {interval, Microseconds, Days, Months} matching the PostgreSQL
wire format directly. Also accept the raw tuple format for encoding.
Owner
|
Oh, are we losing precision by doing this time conversion instead of just returning milliseconds? |
Author
You mean the current implementation which uses |
Owner
|
@eratio08 right, the current implementation. |
Author
I do no thinks so, the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new model for intervals which is faithful to the postgres output format.
This would ideally be usable in as an alternative format such that lpil/pog#67 (comment) can access it. This new type is opt-in and should not break the existing type or dependencies