Add JSONB version to PostgreSQLJSONCustomConvertible #66
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.
Information
Fix bug when user tries to save JSONB (most time it shows when trying to save an array) and receive an error:
unsupported jsonb version number 123
. PostgreSQL requires JSONB version number in a first byte.https://doxygen.postgresql.org/jsonb_8c_source.html#l00104:
Tests
Current code (before PR) is not working, you can see the error in updated test at CircleCI.
Updated test is located in PR vapor/fluent-postgres-driver#58.
Fixes
That commit fixes next issues: