Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

JSON array inputs may need explicit cast/stringify #18

Open
aleclarson opened this issue Sep 10, 2022 · 0 comments
Open

JSON array inputs may need explicit cast/stringify #18

aleclarson opened this issue Sep 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@aleclarson
Copy link
Contributor

If you're calling a Postgres function that accepts t.json or t.jsonb and you pass a JS array, it will be serialized as a Postgres array (not a JSON array). This is a limitation of node-postgres. It also affects INSERT queries, but the runtime types I'm adding for #14 will fix that in the next alpha version.

Related to brianc/node-postgres#2012

@aleclarson aleclarson added the bug Something isn't working label Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant