microsoft / microsoft/vscode-pgsql

[Chat] Connecting to PostgreSQL does not work

Open
#158 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
395
Forks
33
Avg merge
1h 46m
Merged PRs (30d)
3

Description

Type: Bug

Connecting to a PG database does not work from AI Chat.

I get from @pqsql:

🔴 Disconnected! To interact with the database, open a query editor with an active connection.

But I have the MS extension for PG installed and an active connection.

Extension version: 1.8.0
VS Code version: Code 1.104.1 (0f0d87fa9e96c856c5212fc86db137ac0d783365, 2025-09-17T23:36:24.973Z)
OS version: Linux x64 6.8.0-84-generic
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 3204)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 0, 1, 1
Memory (System) 31.07GB (23.19GB free)
Process Argv --crash-reporter-id 90a9e4ab-8550-49eb-a7ee-40d94049807b
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
aj953862:31281341
cs4_fixed:31391938
nes-set-on:31351930
6abeh943:31336334
envsdeactivate2:31353495
0cj2b977:31352657
cloudbuttont:31379625
todos-1:31390405
multireplacestringcontrol:31393296
control_gpt5applypatchexclusively:31392057
3efgi100_wstrepl:31382709
metis-embeddings:31388492
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported @pqsql connection attempt from AI Chat with the PostgreSQL extension and an active database connection. Trace how AI Chat detects the active connection and compare that path with the query editor; done means @pqsql recognizes the connection and no longer reports that the database is disconnected.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.