Type: SQL lowering bug. Target: Prisma 8 PostgreSQL renderer.
The standalone run.ts builds an aliased UPDATE through public Prisma exports:
const plan = native.sql.public.post.as("p")
.update({ title: "alias" })
.returning("id")
.build();
const ast = plan.ast.withWhere(
BinaryExpr.eq(ColumnRef.of("p", "id"), LiteralExpr.of("base")),
);
await runtime.query({ ...plan, ast });
The predicate renders a reference to p, but the UPDATE target loses AS p. PostgreSQL rejects the resulting statement with a missing-FROM-clause or invalid-reference error.
Expected behavior: a public aliased DML AST should lower to internally consistent, executable SQL. Target references should remain valid across WHERE, SET expressions, correlated scopes, and RETURNING.
Suggested regression: aliased UPDATE and DELETE with qualified predicates, expressions, RETURNING, and correlated subqueries.
Primary source: public AST types, PostgreSQL target.
Environment
@prisma/orm-postgres: 8.0.0-rc.8 (the live latest tag when reverified September 6, 2026)
- Prisma CLI:
8.0.0-rc.13
- TypeScript:
5.9.3
- Node:
26.5.0
- npm:
11.17.0
- OS: macOS 26.6.2 arm64
- PostgreSQL:
14.23
Type: SQL lowering bug. Target: Prisma 8 PostgreSQL renderer.
The standalone
run.tsbuilds an aliased UPDATE through public Prisma exports:The predicate renders a reference to
p, but the UPDATE target losesAS p. PostgreSQL rejects the resulting statement with a missing-FROM-clause or invalid-reference error.Expected behavior: a public aliased DML AST should lower to internally consistent, executable SQL. Target references should remain valid across WHERE, SET expressions, correlated scopes, and RETURNING.
Suggested regression: aliased UPDATE and DELETE with qualified predicates, expressions, RETURNING, and correlated subqueries.
Primary source: public AST types, PostgreSQL target.
Environment
@prisma/orm-postgres:8.0.0-rc.8(the livelatesttag when reverified September 6, 2026)8.0.0-rc.135.9.326.5.011.17.014.23