Skip to content

Analyser: a declared parameter type that disagrees with Postgres's inferred type should fail (new E0xx) #1384

Done

Description

@athvin

Follow-up from the requeue bug (found by #561). er-entity analyse plans every statement and passes the E0xx rules, but it does not compare the type Postgres infers for a parameter with the type its .yaml declares. A declared bigint used where Postgres infers float8 (make_interval(secs => $x)) plans cleanly, then fails on every call with WrongType { postgres: Float8, rust: "i64" }. This has shipped at least twice: requeue_launch and capacity_wait, and the new enqueue_deferred before review caught it.

Done when the analyser compares each parameter's inferred type (PREPARE then pg_prepared_statements.parameter_types, or the planner stub's equivalent) with its declared type and fails as a new E0xx code. Its first run must flag these two statements on a commit that predates the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions