Skip to content

pg: client.query(sql, params) never sends its parameters to the server #10330

Description

@proggeramlug

Problem

client.query(sql, params) never reaches the server with its parameters in Perry's pg binding. The whole parameterized-query surface is dead.

Reproducer

Both transports (the legacy sqlx-based path, and the unmerged turnloop-based path) answer:

bind message supplies 0 parameters, but prepared statement "sqlx_s_8" requires 1

(on the turnloop-based path, the same error names an empty prepared-statement id: ...but prepared statement "" requires 1.) The parameters passed to query() never reach the wire-level Bind message on either transport.

Why it matters

Nothing in the repository tested this before Perry's P7 lane found it — there is no test-files/ fixture mentioning pg at all. Every Perry program that calls client.query(sql, [params]) — the standard, documented way to run a parameterized query against PostgreSQL — has been silently broken.

What would fix it

Trace where query()'s parameter array is dropped before the Bind message is constructed and wire it through. This is pre-existing on Perry's base commit and is not something either transport introduced.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions