fix(db): pass driver options to postgres-js#844
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4e88b0b to
02c3a19
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
playground | 02c3a19 | Commit Preview URL Branch Preview URL |
Feb 15 2026, 05:06 PM |
commit: |
onmax
commented
Feb 15, 2026
atinux
reviewed
Feb 23, 2026
Comment on lines
-49
to
+48
| const { default: postgres } = await import(clientPkg) | ||
| client = postgres(connection.url, { | ||
| onnotice: () => {} | ||
| }) | ||
| pkg = 'drizzle-orm/postgres-js' | ||
| const { drizzle } = await import(pkg) | ||
| return drizzle({ client, casing }) | ||
| return drizzle({ connection: { ...connection, onnotice: () => {} }, casing }) |
Contributor
There was a problem hiding this comment.
onnotice cannot be given to the drizzle client @onmax
Where did you see this was possible?
Contributor
Author
There was a problem hiding this comment.
Passing onnotice via connection is supported by drizzle postgres-js driver (it proxies the options to postgres-js), right?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #840
Summary
connectionoptions likeprepare: falseare silently dropped when creating postgres-js clients. Onlyurlis extracted; everything else is discarded. Breaks Supabase transaction pooler (port 6543) which requiresprepare: false.drizzle-orm already forwards extra connection fields to
postgres()viaconst { url, ...config } = connection; postgres(url, config). For the simple case (no replicas), we now let drizzle handle client creation. For replicas/lazy init, we strip onlyurland spread the rest.StackBlitz
preparemissing from postgres() callprepare: falsepresentCLI Reproduction
Verify fix
The
-fixfolder uses pnpm patch to apply the fix locally.