Skip to content

feat(lsp): add a session database context RPC - #794

Open
edjubert wants to merge 1 commit into
supabase-community:mainfrom
edjubert:edjubert/pgls-database-context-rpc
Open

edjubert wants to merge 1 commit into
supabase-community:mainfrom
edjubert:edjubert/pgls-database-context-rpc

Conversation

@edjubert

Copy link
Copy Markdown

What kind of change does this PR introduce?

Feature.

What is the current behavior?

Database settings are loaded from project configuration and environment variables. Clients cannot update the database context for an active LSP session.

What is the new behavior?

Adds the pgls/setDatabaseContext request.

Clients can update the host, port, username, password, database, and search path for the current server session without changing configuration files or environment variables.

The request validates its payload, rejects connection strings and roles, and keeps passwords redacted from debug output.

Additional context

This enables editor integrations and other clients to switch database context at runtime while keeping the change scoped to the current PgLS session.

@edjubert
edjubert force-pushed the edjubert/pgls-database-context-rpc branch from 4ab9acd to d4fa3cd Compare September 12, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant