Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun SQL: unix socket path support #17617

Open
dmythro opened this issue Feb 24, 2025 · 0 comments
Open

Bun SQL: unix socket path support #17617

dmythro opened this issue Feb 24, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dmythro
Copy link

dmythro commented Feb 24, 2025

What is the problem this feature would solve?

Services like Google Cloud has a recommended way of connecting to attached Cloud SQL instances via unix socket path, which I don't see supported in docs now.

What is the feature you are proposing to solve the problem?

Support a socket path in Bun SQL connection, something like this:

DATABASE_URL=postgresql://<user>:<password>@/<database>?socket=/cloudsql/<INSTANCE_CONNECTION_NAME>

Or this:

import { SQL } from "bun";

const db = new SQL({
  // Required
  url: "postgres://user:pass@localhost:5432/dbname",

  // Unix socket path for Google Cloud SQL
  path: '/cloudsql/<INSTANCE_CONNECTION_NAME>/.s.PGSQL.5432',
});

What alternatives have you considered?

No response

@dmythro dmythro added the enhancement New feature or request label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant