Skip to content

A boolean cast to json or jsonb in SQL fails with cannot cast type boolean to jsonb #84

Open

Description

@okomarov

Parse declares bool for a JS boolean (inferType in src/types.js), so ${ true }::jsonb fails with "cannot cast type boolean to jsonb". parameter_types: 'client' keeps declared types, so it doesn't help. Same root as #45: the driver declares a type for some JS values instead of leaving them untyped.

Reported as porsager#386; porsager#392 proposed removing the inference.

Also reported as porsager#931.

Activity

  1. added
    bug
    area: serialization
    upstream
    on Oct 16, 2026
  2. moved this to Later in Roadmapon Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: serializationbugupstream

    Type

    No type

    Projects

    • Status
      Later

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions