Story: sqlgen improvements

Table of Contents

This page documents a story in Sprint 11. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Tighten the sqlgen surface so the project doesn't need to keep raw libpq for the cases sqlgen doesn't yet cover.

Status

Field Value
State DONE
Parent sprint Sprint 11
Now Completed 2026-02-06.
Waiting on None.
Next None.
Last touched 2026-02-06

Continued in: sqlgen follow-up (sprint 12) — the upstream PRs merged but vcpkg hasn't picked up a release; adoption work remains blocked there.

Acceptance

  • Codebase swept for raw libpq use; remaining cases moved to ores.database.
  • NOTICE logging support raised upstream and PR opened.
  • Bound-parameter support tracked upstream (blocked on the fix landing).

Tasks

Task State Start End Description
Audit for uses of raw libpq DONE 2026-05-19 2026-02-01 Sweep the codebase for libpq escapes Claude has snuck in; move all into ores.database; raise tickets on sqlgen for the gaps.
Add NOTICE logging support to sqlgen DONE 2026-05-19 2026-02-01 Upstream PR getml/sqlgen#120 + proposal #118 — Postgres notice processor hook.
Add bound parameters to sqlgen BLOCKED 2026-05-19   Replace remaining libpq escapes for SQL-injection-safe queries with native sqlgen bound parameters.

Decisions

Upstream-first for sqlgen gaps
avoid carrying long-running local patches.

Out of scope

  • Forking sqlgen.

See also

None.

Emacs 29.1 (Org mode 9.6.6)