Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PostgreSQL ClientNew to Visual Studio Code? Get it now.
PostgreSQL Client

PostgreSQL Client

Wilmer Vasquez

|
30 installs
| (0) | Free
PostgreSQL client for VS Code: explorer, SQL query runner and ERD diagrams
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PostgreSQL Client

Overview

PostgreSQL Client is a PostgreSQL-only VS Code extension for managing connections, exploring database objects, running SQL, reviewing results and query activity, browsing table data, and visualizing relationships in an interactive ERD. Saved connection profiles are stored with VS Code SecretStorage.

Features

Server explorer

  • Connections are plain postgresql:// URLs; manage them from the sidebar.
  • Paste a connection URL from the clipboard to fill the connection form automatically. Saved connections can be edited, cloned or deleted; saving keeps the manager open.
  • Every database expands to the full PostgreSQL object tree:
    • Casts, Catalogs, Event Triggers, Extensions, Foreign Data Wrappers, Languages, Publications, Schemas and Subscriptions.
    • Schemas expose their tables, views, enum types and functions; tables open the data browser or the ERD, and enum nodes list their labels.
  • Cluster level folders for Databases, Login/Group Roles and Tablespaces.
  • Create schemas, inspect database properties, drop databases or disconnect from the context menu.

SQL editor and query runner

  • .sql files get PostgreSQL syntax highlighting out of the box (a dedicated source.sql grammar replaces the built-in one), plus a pgsql language for .pgsql, .psql and .pgsql.sql files.
  • Smart SQL autocompletion: every PostgreSQL keyword from the parser, built-in functions and data types, plus schemas, tables/views and columns from the connection bound to the document. Aliases (u.), schema. and :: casts are resolved against the catalog.
  • Snippets for common PostgreSQL statements (SELECT, INSERT, CREATE TABLE, CTEs, window functions, …).
  • Run the whole file or just the selection with Ctrl+Enter (Cmd+Enter on macOS); multi-statement scripts return one result set per statement.
  • Results open in the bottom Panel, next to the Terminal/Problems/Output tabs (PostgreSQL panel → Query Results), keeping your editor focused.
  • Choose which connection a document runs against from the editor context menu or the status bar.
  • A CodeLens on the first line of every SQL document shows the bound connection and database; click either to switch, hold the pointer over it for the target details, and pin a document to another database on the same connection with Select Database for Query. Both bindings survive a window reload.

Results panel (bottom Panel)

  • Lives in the bottom panel area, alongside the Terminal, and is revealed automatically when a query runs.
  • Row grid with sticky headers, column types, client-side sorting and filtering.
  • Copy or save results as CSV/JSON, copy the executed SQL, reopen it in an editor, or rerun it.
  • The Output tab logs executed statements, success/error status, messages and duration; filter, copy or clear the activity log.
  • PostgreSQL errors show code, detail, hint and the failing line/column.
  • The executed statement is always one tab away, and recent queries are kept in a Query History view (last 100).

ERD diagrams

  • Interactive entity relationship diagram with crow's-foot/one markers, schema colours and row estimates.
  • Schema picker, database switcher, table filter, hide/collapse tables and saved layout per connection/database.
  • Layouts: horizontal, vertical, grid or circular; curved or orthogonal edges; all fields, keys only or table names.
  • Double-click a table to open its data; generate SELECT statements or export the schema as DDL (copy, save .sql, or open in the query editor).

Table data browser

  • Paginated data grid with row selection and field-type indicators. The Properties and DDL tabs are placeholders and are not implemented yet.

Activity monitor

  • Open Activity Monitor from a database in the PostgreSQL tree to view live server activity, sessions, configuration, logs and system information.
  • Activity charts are scoped to the selected database; State, Configuration, Logs and System show server-wide information where PostgreSQL permissions allow it.
  • The refresh interval defaults to 2 seconds and can be changed in the monitor or with postgresql.monitor.refreshInterval (1–60 seconds).

Getting started

  1. Install the extension and open the PostgreSQL Client view in the activity bar.
  2. Run Manage Connections and add a postgresql://user:password@host:5432/database URL, or paste one from the clipboard. Existing connections can be edited, cloned or deleted there.
  3. Use New Query (or create a .sql file) and press Ctrl/Cmd+Enter to run it.
  4. Right-click a database or schema and choose Open ERD to explore relationships.

Requirements

  • VS Code 1.107.0 or higher.
  • PostgreSQL 11 or newer (some folders, like subscriptions, need a superuser to be listed).

Settings

Setting Default Description
postgresql.results.maxRows 2000 Maximum number of rows rendered in the results panel. The total row count is still reported.
postgresql.erd.excludeSystemSchemas true Hide pg_catalog, information_schema and pg_toast from the ERD schema picker.
postgresql.monitor.refreshInterval 2000 Activity monitor refresh interval in milliseconds (minimum 1000, maximum 60000).

License

MIT

Author

wilmervasquez

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft