microsoft / microsoft/vscode-pgsql

SELECT without columns fails

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

Nobody has claimed this yet.

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

Description

Describe the bug

A SELECT without columns fails on an internal error:

syntax error at or near ")"
LINE 1: SELECT "oid", "typname" FROM "pg_type" WHERE "oid" IN ()
^

To Reproduce

select from pg_class;

Expected behavior

On psql it displays the number of rows:

postgres=> select from pg_class;
--
(419 rows)

VS Code version

Version: 1.126.0 (user setup)
Commit: 7e7950df89d055b5a378379db9ee14290772148a
Date: 2026-06-23T01:46:13Z
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Windows_NT arm64 10.0.26200

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 tracing how the extension parses and handles the select from pg_class query, then inspect the code that generates the pg_type lookup shown in the error. Reproduce the failure and compare it with psql; done means the query executes without the empty IN () syntax error and reports the row count.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.