-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inserting Buffer / ArrayBuffer values for BYTEA fields are corrupt under HTTP client #118
Comments
Thanks for the thorough report. I can see this is a problem. Let me see if this is best solved on the front- or back-end. |
OK. I wanted to figure out where this issue came from. Note that we use the We call This leaves As an aside, When querying over WebSockets, the prepared But over HTTP the So: I think we do need to handle these objects specially for HTTP on the client side. We can't do this nicely on the back-end, since it will be hard at that point to distinguish the stringified data from any other string. What you've done in #119 looks pretty sensible on this score, so many thanks. I've also investigated how the |
Inserting binary data by passing a
Buffer
orArrayBuffer
value works fine under the webhook client (handled by the underlyingpg
implementation), but is unimplemented under the http client and silently breaks, instead inserting corrupted values representing the result of causingJSON.stringify()
on theBuffer
value.Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: