porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
The Unlicense
7.51k stars 275 forks source link

Insert helper fails on jsonb column when passed an array of booleans #575

Closed evelant closed 1 year ago

evelant commented 1 year ago

repro: https://github.com/evelant/postgresjs-jsonb-array-bug

If you have a jsonb column and attempt to use the insert helper with an array of booleans for that column it will fail with

column "test_col" is of type jsonb but expression is of type boolean

When inserting/updating large objects that contain some jsonb arrays of booleans this makes the helper unusable.

porsager commented 1 year ago

This looks related to #392