Skip to content

Add support for UNIX socket connection to PostgreSQL#352

Open
TobiX wants to merge 1 commit into
LogicLabs-OU:mainfrom
TobiX:postgresql-socket
Open

Add support for UNIX socket connection to PostgreSQL#352
TobiX wants to merge 1 commit into
LogicLabs-OU:mainfrom
TobiX:postgresql-socket

Conversation

@TobiX
Copy link
Copy Markdown

@TobiX TobiX commented Apr 12, 2026

Minimal prototype. I tried to unify the connection code into one place
(src/helpers/db.ts), since Drizzle seems to need slightly different config in
different places (see the issue linked from #343).

Closes #343

Slightly tested in dev mode, migrations work, application starts.

Caveat: This uses the host parameter instead of the path parameter (see
https://github.com/porsager/postgres#connection-details), since the connection
code (https://github.com/porsager/postgres/blob/master/src/index.js#L468)
builds the "real" socket name from that. If you want, I can extend the code to
check for the path to make this a little bit more "auto-magic".

Feel free to close if you don't want this feature.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@TobiX
Copy link
Copy Markdown
Author

TobiX commented Apr 12, 2026

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow UNIX socket connection to PostgreSQL database

1 participant