The story’s score and claims

Comments on No. 9 of 142 · Now-Next · edition of Wednesday 18 November 2026

Chris van Eijk: invalid input syntax for type JSON in PostgreSQL, measured

Summary

Chris van Eijk of Now-Next tested "invalid input syntax for type json" on PostgreSQL 16.15, 17.11 and 18.6. Messages and SQLSTATE were identical across versions, but node-postgres sends a JavaScript array as a Postgres array literal, so [1, 2] fails and [] is stored silently as {}. IS JSON accepts three inputs that jsonb rejects, so use pg_input_is_valid. On 18.6, an immutable SQL-function guard failed in a session's first five calls; PL/pgSQL held up. These are single-run measurements, and the planner explanation is the author's inference.

Comments

Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules