Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upunsupported jsonb number 123 #1788
Comments
This comment has been minimized.
rrichardson
commented
Jul 18, 2018
|
Found the problem. Since I'm providing the binary format, I need to prefix the value with |
rrichardson
closed this
Jul 18, 2018
This comment has been minimized.
|
You should avoid relying on the concrete representation of PG's json types or Diesel specific implementations. Instead you should work in terms of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rrichardson commentedJul 18, 2018
Setup
osx brew install postgres$ otool -L target/debug/fries
target/debug/fries:
/usr/local/opt/postgresql/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.10.0)
Versions
Feature Flags
Problem Description
When running my importer app, it fails to insert into a Jsonb field and errors with:
I reckon it is related to lib/pq#528
This makes me think that maybe serializing the json into a byte array is the wrong thing.. but I'm not sure what the correct approach is.. (see fn to_sql below)
What are you trying to accomplish?
Insert my custom serde_json type into a jsonb column
What is the expected output?
Success
What is the actual output?
DatabaseError(__Unknown, "unsupported jsonb version number 123")Are you seeing any additional errors?
None that I can find
Steps to reproduce
Checklist
closed if this is not the case)