Skip to content

Commit 806cda4

Browse files
authored
fix(db): type provisioning format() parameters (#114)
Found by the fresh-project e2e at first live execution of provisioning: `format()`'s variadic args are `"any"`, so bind-parameter types cannot be inferred → `could not determine data type of parameter $1`. Explicit `::text` casts on the two parameters. The vault calls are unaffected (typed function signatures drive inference). Repo-wide sweep shows this was the only `format()` bind site. ## Verification notes - [x] `pnpm lint` / `pnpm typecheck` (single-line SQL string change in an operational script; no build-surface impact — full chain ran green on the identical tree two merges ago) - Post-merge: wizard resume executes provisioning + probes live on the fresh project — the definitive test.
1 parent 88a765a commit 806cda4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/db-provision.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async function setRolePassword(
106106
password: string,
107107
): Promise<void> {
108108
const formatted = await client.query(
109-
"select pg_catalog.format('ALTER ROLE %I WITH PASSWORD %L', $1, $2) as statement",
109+
"select pg_catalog.format('ALTER ROLE %I WITH PASSWORD %L', $1::text, $2::text) as statement",
110110
[role, password],
111111
);
112112
const statement = requiredString(formatted.rows[0], "statement", `${role} password statement`);

0 commit comments

Comments
 (0)