Skip to content

[postgres] Extend wire-layer type fidelity to Integer, Double, Boolean, Date scalar columns #4202

Closed

Description

@robfrank

Follow-up to #4200 / #4201.

PR #4201 narrowly fixes the round-trip regression for Long-valued scalar columns (the id() case) by advertising them as INT8 on the Postgres wire instead of VARCHAR. The remaining scalar types still collapse to VARCHAR in PostgresNetworkExecutor.getColumns():

  • Integer / Short / Byte → INT4
  • Double → FLOAT8
  • Float → FLOAT4
  • Boolean → BOOL
  • Date / LocalDateTime → DATE / TIMESTAMP
  • Character → CHAR

Clients (psycopg, JDBC, SQLAlchemy, …) decide deserialization based on the announced column type, so the same class of bug — value round-trips as a string, parameter loop silently fails — can in principle hit any of these. The Long fix has the simplification scaffolding in place (pgType.isArrayType() || pgType == PostgresType.LONG) so adding the other types is one-line each, but each one needs:

  1. A round-trip integration test (engine + Postgres wire) to confirm it does not regress existing clients.
  2. Confirmation that the text-format serialization in serializeAsText produces output the announced type's text format accepts (true/false for BOOL, ISO-8601 for DATE/TIMESTAMP, decimal for INT4/FLOAT8 — most are fine, but BOOL and DATE/TIMESTAMP deserve a careful audit).

Out of scope for #4201, which deliberately limited blast radius to fix the reported regression.

Activity

  1. added a commit that references this issue on May 11, 2026
  2. added 5 commits that reference this issue on May 19, 2026
  3. added this to the 26.6.1 milestone on May 21, 2026
  4. added a commit that references this issue on Jun 28, 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

    enhancementpostgresql-wire

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions