PostgreSQL Error 22034: more than one sql json item
PostgreSQL error code 22034 (more than one sql json item) occurs when a SQL/JSON function such as JSON_VALUE() or JSON_QUERY() encounters a JSON path expression that returns more than one item, while the function context expects exactly one. This error became more prevalent with the introduction of SQL-standard JSON functions in PostgreSQL 15 and later.
Top 3 Causes
1. Wildcard path in JSON_VALUE() returning multiple results
JSON_VALUE() strictly requires a single scalar return value. Using a wildcard like $[*] across an array will match multiple elements and immediately trigger error 22034.






