electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.41k stars 154 forks source link

JSONB fields that are null are sent as empty string. #1536

Closed MAST1999 closed 2 months ago

MAST1999 commented 2 months ago

To reproduce it, create a table with a JSONB field and insert some data but leave the JSONB field to be null. Request the shape for table, and you will see the JSONB field being sent as an empty string, but it should be null.

This causes the sync to pglite to fail because, parsing an empty string throws.

Here's a link discussion related to this issue in Discord.

kevin-dp commented 2 months ago

Hi @MAST1999, thank you for reporting this bug. This bug should be fixed as soon as this PR is merged.