microsoft / microsoft/vscode-pgsql

Support schema selection through PgBouncer without startup `options`

Open
#306 0 comments 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

When a schema is selected in a connection profile, the extension passes it
through the PostgreSQL startup option:

options=-c search_path=public,client_schema

Some PgBouncer configurations reject this with:

FATAL: unsupported startup parameter in options: search_path

A connection without options succeeds, but schema-aware queries cannot be
used through such PgBouncer endpoints.

Please consider adding an optional connection-initialization SQL command, for
example:

SET search_path TO public, client_schema;

Manually prepending SET search_path TO public, client_schema; to every query is not an
equivalent workaround. It does not provide schema context to extension
features such as IntelliSense, which can then suggest a large number of
objects from unrelated schemas. It also makes query-history entries less
useful, since many queries begin with the same SET search_path TO public, client_schema; statement.

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 handles schema selection in connection profiles and constructs PostgreSQL startup options. Find the connection-initialization path and determine how an optional SQL command could run before schema-aware features; done means schema selection works through PgBouncer without embedding SET statements in every query.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.