Allow connection profiles to be declared in workspace settings.json for team sharing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start by tracing extension activation and how connections are loaded into the connections tree, then inspect the existing secret-storage and user-settings paths. Define how workspace descriptors merge with personal connections, how the source badge is shown, and how a missing password reaches the normal prompt. Done means non-secret workspace profiles appear after cloning without committing credentials, and existing personal connections still work.
Written by the indexing model from the issue text.
Description
Problem
Connection profiles in the PostgreSQL extension are stored in VS Code's global secret storage and user settings — neither of which is committed to source control. In a team environment, every developer must manually re-enter connection details (host, port, database, username) for shared databases (dev/staging). There is no way to ship a pre-populated, non-secret connection profile as part of a repository.
Use Case
A team wants to commit a .vscode/settings.json that pre-declares non-secret connection attributes:
{
"pgsql.connections": [
{
"name": "Dev DB (shared)",
"host": "dev-db.internal.example.com",
"port": 5432,
"database": "myapp_dev",
"user": "devuser",
"passwordSource": "prompt" // or "pgpass" | "secretStorage"
}
]
}
When a developer clones the repo and opens it, the connection appears pre-populated in the sidebar — they only need to supply the password.
Why This Is Safe
Passwords are never committed (the passwordSource field controls where the credential comes from). Only non-secret metadata (host, port, db name, user) is in the settings file. This mirrors how SQL Server extension (mssql) handles workspace-level connection profiles.
Proposed Change
- Add
pgsql.connectionsas a workspace-scope configuration key (array of connection descriptors, no password field). - On activation, merge connections from workspace settings into the connections tree (alongside secret-storage ones), displaying a source badge ("workspace" vs "personal").
- Connecting a workspace connection that has no password triggers the normal password prompt and optionally stores it in secret storage for the session.
Environment
- VS Code: 1.89+, team sharing
.vscode/settings.jsonvia git - Extension: ms-ossdata.vscode-pgsql latest
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-pgsql
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-pgsql#190 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-pgsql#307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
microsoft/vscode-pgsql#306 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-pgsql#305 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-pgsql#302 ·
All issues in microsoft/vscode-pgsql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Business User Story
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100