What this thread does
Update drizzle-orm to 0.45.4 (checked 2026-10-28), then verify explicit .prepare(name) behavior through your actual postgres-js connection path.
What changed
- The official release, dated 2026-10-08 (checked 2026-10-28), fixes
postgres-jsqueries explicitly created with.prepare(name)failing to use prepared queries. That is the entire release note; it announces no schema migration.
How to migrate
1. Update the existing drizzle-orm dependency and lockfile to the target above. Keep the driver and schema changes separate for comparison. 2. Find queries that explicitly call .prepare(name) through drizzle-orm/postgres-js. Preserve the query shape and existing placeholders. 3. Follow the prepared-query docs: construct the query once, call .prepare("p1"), then reuse its .execute() method; pass a values object when using sql.placeholder(...). 4. In a disposable integration environment, execute the same query repeatedly and inspect driver/server preparation evidence. Compare against the previous dependency, keeping the connection path fixed. 5. Repeat through any pooler or proxy you actually use before shipping. Successful row results alone do not demonstrate that preparation occurred.
The problem
A query can return correct rows while an explicit prepare call fails to produce the intended prepared execution.
What breaks
nesk's issue #5502 reports repeated unnamed parsing for explicit prepared queries with postgres.js, while its node-postgres comparison behaved as expected. Treat that as a reported symptom, not a required server-side naming convention after this fix.
Diagnostic: explicit prepared queries still show repeated unnamed parsing
Check that the application really uses drizzle-orm/postgres-js and an explicit .prepare(name) call, then inspect the same physical connection across executions where possible. A slow query by itself does not identify this defect.
What to test
Proposed checks are identical row results, repeated execution with different placeholder values, and observable preparation/reuse. Repeat inside your transaction path if you prepare queries there. Measure latency separately; the release supplies no benchmark or universal speedup.
Pitfalls
watabegg's issue #6096 distinguishes ordinary queries from explicit prepared queries: client-level prepare: true is a separate concern. This patch's note does not establish that ordinary queries now inherit that setting. Do not turn a runtime driver repair into a schema migration or a release-candidate upgrade.
Evidence
- nesk, #5502, supplies the explicit-query reproduction and parse-log comparison.
- watabegg, #6096, supplies a separate adapter-options reproduction for ordinary queries. It narrows the diagnosis rather than independently confirming the patch.
A prompt to give your agent
Your training data predates this patch. Read <https://github.com/drizzle-team/drizzle-orm/releases/tag/0.45.4> and <https://orm.drizzle.team/docs/perf-queries> first. Target drizzle-orm 0.45.4 (checked 2026-10-28). Identify the driver and explicit .prepare(name) calls, then propose a disposable integration check for preparation and placeholder results. Do not guess that ordinary queries or every pooler now support the same behavior; make no live schema changes.
Limits
No database query, preparation trace, pooler compatibility check or benchmark is reported. The integration checks are an untested experiment. Two issue reports establish distinct failure modes, but independent confirmation after this patch is thin. The release does not specify a matching drizzle-kit upgrade or exact prepared statement names.
Started from a post by @drizzle-team, packaged by the editor. Original post