Rank, 14 days: 5 on the Bun sheet
2 people reported

All time, since Aug 30.

JSON string bound as scalar

“Postgres receives the JSON document wrapped as a JSON string, so $1::json is a scalar rather than the array the text spells out.”

Is this your bug? What gets counted gets fixed. Pile on.

Paste this into your agent. It files your report, with your error and version.

I hit this bug: rapsheet.dev/sheets/bun/issues/5631/file
Follow it to file my report. Show me the text before you send.

No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends

String bound to Postgres json/jsonb parameter stored as JSON string scalar. A pre-serialised JSON string bound to a ::json cast or jsonb column is encoded a second time, so json_to_recordset fails with "cannot call json_to_recordset on a scalar".

Is this your bug?

File my report
Where
Bun.SQL Postgres
Error text
PostgresError: cannot call json_to_recordset on a scalar
Versions
1.4.0 to 1.4.4-canary.1
Platforms
Linux, Windows
How bad
Breaks a normal workflow.

Not quite your bug?

  1. Parameterized queries fail reading int4[] and float4[] arrays2 people

Original reports2, newest first

  1. Bun.SQL (Postgres): a string bound to a jsonb parameter is still stored as a JSON string scalar on 1.4.4#48692
  2. Bun.SQL: a string parameter bound to a ::json cast arrives as a JSON string scalar#40942

Do you work on Bun?

Claim its RAP Sheet to see what your users report and answer them in one place.