Skip to main content
pgconsole’s SQL editor is a workspace for writing queries, browsing schemas, and working with results. What sets it apart:
  • Understands your SQL — syntax highlighting, autocomplete, formatting, error detection, and function signature help are all backed by a PostgreSQL parser, not regex.
  • Guardrailsdatabase access control and audit logs ensure every query is authorized and recorded.
  • AI assistant — generate, explain, fix, and rewrite SQL with an AI assistant that understands your schema context.
SQL Editor overview

Editor

SQL Intelligence

The editor parses your SQL in real-time to provide:
  • Autocomplete — context-aware suggestions for tables, columns, joins, and CTEs (Ctrl+Space) Autocomplete suggestions
  • Formatting — pretty-print or collapse to one line SQL formatting
  • Error detection — red underlines with hover tooltips; optionally Fix with AI
  • Code folding — collapse SELECT, WITH, and other blocks

Quick SQL Generation

When a table or view is selected in the schema browser, the Quick SQL menu generates SQL templates and inserts them into the editor:
INSERT, UPDATE, DELETE, CREATE TABLE, and ALTER ADD COLUMN are only available for tables (not views).
Quick SQL menu

Data Grid

Query results appear in the panel below the editor in a virtual-scrolling grid that handles large result sets efficiently. Query results
ActionBehavior
Click a rowOpen the row detail panel
Double-click a cellStart editing that cell
j / Select next row
k / Select previous row
SpacePin or unpin the selected row
Pinned rows stick to the top of the grid for easy comparison across large result sets.

Inline Editing

With write permission, you can modify data directly in the grid. All changes are staged locally — nothing is committed until you explicitly execute. Row detail panel
ActionHow
Edit a cellDouble-click the cell, or click the row and press Edit in the detail panel
Add a rowClick the + button in the results toolbar
Delete a rowRight-click and select Delete, or use the Delete button in the detail panel
Duplicate a rowRight-click and select Duplicate (primary key fields cleared)
Staged changes are color-coded: green for new rows (INSERT), amber for modified rows (UPDATE), red with strikethrough for deleted rows (DELETE). When changes are pending, a floating bar lets you Preview the generated SQL or Discard all changes. The preview modal shows syntax-highlighted INSERT/UPDATE/DELETE statements and optionally an AI-powered risk assessment before you Execute All. Staged changes preview

Data Export

  • Export to CSV — downloads visible rows as a CSV file (requires export permission)
  • Copy as Markdown — copies results as a markdown table to the clipboard

Schema Inspection

Schema tabs provide detailed inspection of database objects. Schema tab

Active Sessions

The Processes button in the toolbar opens a modal showing active database connections. The list auto-refreshes periodically. With admin permission, a Terminate button appears on each row with a confirmation countdown. Active processes