[Feature Request]: Support bulk creation/import of PostgreSQL connections
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- postgresql
- Domain
- databases
Research direction
Start with the PostgreSQL view (tree), its context menu, and the existing extension UI for adding connections; no files or tests are named in the issue. Define the connection file format and import/export behavior first, then establish validation, preview, secret handling, grouping, and update rules before implementation. Done means the commands and context-menu actions support validated bulk import and export with confirmation.
Written by the indexing model from the issue text.
Description
At the moment, PostgreSQL connections must be added one by one through the extension UI, which is slow and repetitive when working with many environments (DEV, QA, STAGING, multiple servers, etc.). For users and teams managing dozens of databases, a way to define and import all connections at once would greatly improve productivity and reduce configuration errors.
Proposed Feature
1. Import/Export connections
- Command to export all existing connections to a JSON/YAML file.
- Command to import from such a file and create/update multiple connections in one operation.
- Optional support for environment variables for passwords/connection strings so secrets are not stored in plain text.
2. Connection definition format
- Each connection entry should support:
- Label/name
- Host, port
- Database name
- Authentication
- SSL and advanced options
- Optional grouping/folder (e.g., DEV, QA, PROD, project name)
Example (pseudo‑JSON):
{
"groups": [
{
"name": "DEV",
"connections": [
{
"label": "Local Dev",
"host": "localhost",
"port": 5432,
"database": "my_app_dev",
"user": "dev_user",
"passwordEnv": "MY_APP_DEV_DB_PASSWORD"
},
{
"label": "Shared Dev",
"connectionStringEnv": "MY_APP_SHARED_DEV_DB_URL"
}
]
}
]
}
3. UI entry points
- New commands such as:
PostgreSQL: Import Connections From File…PostgreSQL: Export Connections To File…
- Context menu items on the PostgreSQL view (tree) to trigger import/export.
4. Validation and safety
- Validate the file before applying changes (required fields, duplicate labels, invalid options).
- Show a preview of connections that will be created or updated, with confirmation.
- Option to require that secrets come from environment variables or a secret store.
Benefits / Use Cases
- Fast setup of the same connection set on multiple machines or developer environments.
- Easier onboarding for new team members: they import a single config file and are ready to work.
- Ability to keep non‑secret connection metadata (labels, hosts, database names) under version control for a project, improving consistency across the team.
- 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 78/100
use-agent-os/agent-os#3312 ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HarperFast/documentation#677 ·
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100