Describe the bug
Connecting through sockets allows for easy user-based authentication on shared servers. There is currently no documented way of connecting to a socket with the extension.
To Reproduce
Steps to reproduce the behavior:
- Configure posgres with socket authentication locally, e.g. the default on Ubuntu
- Create a new connection in the VS code extension
- Set the host to /var/run/postgresql, or set the connection string to "psql -h /var/run/postgresql/.s.PGSQL.5432"
- Click 'test'
- See error
Expected behavior
Connects locally through the socket found in /var/run/postgresql/.s.PGSQL.$port_number
Screenshots
Error says: Connection error: connection is bad: could not parse network address "/var/run/postgresql": Name or service not known
VS Code version
Version: 1.100.2
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z (1 wk ago)
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Extension Logs
2025-05-23 15:57:50,986 INFO _ _ _
2025-05-23 15:57:50,986 INFO _ __ __ _ ___ __ | | | | ___ ___ | |___
2025-05-23 15:57:50,986 INFO | '_ \ / / __|/ _ | |_____| __/ _ \ / _ | / __|
2025-05-23 15:57:50,986 INFO | |) | (| _ \ (| | |_____| || () | () | _ \
2025-05-23 15:57:50,986 INFO | ./ _, |/_, || __/ _/||/
2025-05-23 15:57:50,986 INFO || |/ ||
2025-05-23 15:57:50,988 INFO Initialized ConnectionManager
2025-05-23 15:57:50,988 INFO Admin service successfully initialized
2025-05-23 15:57:50,988 INFO Language Service Operations Queue starting...
2025-05-23 15:57:50,988 INFO Metadata service successfully initialized
2025-05-23 15:57:50,988 INFO Object Explorer service successfully initialized
2025-05-23 15:57:50,988 INFO Query execution service successfully initialized
2025-05-23 15:57:50,988 INFO Scripting service successfully initialized
2025-05-23 15:57:50,988 INFO Edit data service successfully initialized
2025-05-23 15:57:50,989 INFO Chat service successfully initialized
2025-05-23 15:57:50,989 INFO tools successfully initialized
2025-05-23 15:57:50,989 INFO Schema Editor service successfully initialized
2025-05-23 15:57:50,989 INFO Starting JSONRPC message server.
2025-05-23 15:57:50,989 INFO JSONRPC input thread started.
2025-05-23 15:57:50,989 INFO JSONRPC output thread started.
2025-05-23 15:57:50,990 INFO Received request id=0 method=initialize
2025-05-23 15:57:50,994 INFO ResponseSuccess message sent id=0 method=None
2025-05-23 15:57:50,998 INFO Received notification method=initialized
2025-05-23 15:57:50,998 WARNING Notification method initialized is unsupported
2025-05-23 15:57:50,999 INFO Received notification method=workspace/didChangeConfiguration
2025-05-23 15:57:56,613 INFO Received notification method=$/setTraceNotification
2025-05-23 15:57:56,614 WARNING Notification method $/setTraceNotification is unsupported
2025-05-23 15:57:56,614 INFO Received notification method=workspace/didChangeConfiguration
2025-05-23 15:57:56,615 INFO Received request id=1 method=capabilities/list
2025-05-23 15:57:56,626 INFO ResponseSuccess message sent id=1 method=None
2025-05-23 16:01:06,558 INFO Received request id=2 method=connection/connect
2025-05-23 16:01:06,565 INFO Attempting to connect: owner_uri=[snipped]
2025-05-23 16:01:06,565 INFO Creating new connection pool for details_hash=9169922887297585895
2025-05-23 16:01:06,565 INFO ResponseSuccess message sent id=2 method=None
2025-05-23 16:24:53,017 ERROR Connection error for host=/var/run/postgresql/.s.PGSQL.5432 dbname=test user=test password=***** hostaddr=/var/run/postgresql connect_timeout=15 client_encoding=utf8 options='-h /var/run/postgresql' sslmode=disable port=5432: connection is bad: could not parse network address "/var/run/postgresql": Name or service not known
Add any other context about the problem here.
I'm using a remote connection from macOS to a server running Ubuntu
Describe the bug
Connecting through sockets allows for easy user-based authentication on shared servers. There is currently no documented way of connecting to a socket with the extension.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Connects locally through the socket found in /var/run/postgresql/.s.PGSQL.$port_number
Screenshots
Error says: Connection error: connection is bad: could not parse network address "/var/run/postgresql": Name or service not known
VS Code version
Version: 1.100.2
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z (1 wk ago)
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Extension Logs
2025-05-23 15:57:50,986 INFO _ _ _
2025-05-23 15:57:50,986 INFO _ __ __ _ ___ __ | | | | ___ ___ | |___
2025-05-23 15:57:50,986 INFO | '_ \ /
/ __|/ _| |_____| __/ _ \ / _ | / __|2025-05-23 15:57:50,986 INFO | |) | (| _ \ (| | |_____| || () | () | _ \
2025-05-23 15:57:50,986 INFO | ./ _, |/_, || __/ _/||/
2025-05-23 15:57:50,986 INFO || |/ ||
2025-05-23 15:57:50,988 INFO Initialized ConnectionManager
2025-05-23 15:57:50,988 INFO Admin service successfully initialized
2025-05-23 15:57:50,988 INFO Language Service Operations Queue starting...
2025-05-23 15:57:50,988 INFO Metadata service successfully initialized
2025-05-23 15:57:50,988 INFO Object Explorer service successfully initialized
2025-05-23 15:57:50,988 INFO Query execution service successfully initialized
2025-05-23 15:57:50,988 INFO Scripting service successfully initialized
2025-05-23 15:57:50,988 INFO Edit data service successfully initialized
2025-05-23 15:57:50,989 INFO Chat service successfully initialized
2025-05-23 15:57:50,989 INFO tools successfully initialized
2025-05-23 15:57:50,989 INFO Schema Editor service successfully initialized
2025-05-23 15:57:50,989 INFO Starting JSONRPC message server.
2025-05-23 15:57:50,989 INFO JSONRPC input thread started.
2025-05-23 15:57:50,989 INFO JSONRPC output thread started.
2025-05-23 15:57:50,990 INFO Received request id=0 method=initialize
2025-05-23 15:57:50,994 INFO ResponseSuccess message sent id=0 method=None
2025-05-23 15:57:50,998 INFO Received notification method=initialized
2025-05-23 15:57:50,998 WARNING Notification method initialized is unsupported
2025-05-23 15:57:50,999 INFO Received notification method=workspace/didChangeConfiguration
2025-05-23 15:57:56,613 INFO Received notification method=$/setTraceNotification
2025-05-23 15:57:56,614 WARNING Notification method $/setTraceNotification is unsupported
2025-05-23 15:57:56,614 INFO Received notification method=workspace/didChangeConfiguration
2025-05-23 15:57:56,615 INFO Received request id=1 method=capabilities/list
2025-05-23 15:57:56,626 INFO ResponseSuccess message sent id=1 method=None
2025-05-23 16:01:06,558 INFO Received request id=2 method=connection/connect
2025-05-23 16:01:06,565 INFO Attempting to connect: owner_uri=[snipped]
2025-05-23 16:01:06,565 INFO Creating new connection pool for details_hash=9169922887297585895
2025-05-23 16:01:06,565 INFO ResponseSuccess message sent id=2 method=None
2025-05-23 16:24:53,017 ERROR Connection error for host=/var/run/postgresql/.s.PGSQL.5432 dbname=test user=test password=***** hostaddr=/var/run/postgresql connect_timeout=15 client_encoding=utf8 options='-h /var/run/postgresql' sslmode=disable port=5432: connection is bad: could not parse network address "/var/run/postgresql": Name or service not known
Add any other context about the problem here.
I'm using a remote connection from macOS to a server running Ubuntu