PL/pgSQL IntelliSense (mindkerchief.pg-sql-intellisense)
Zero-configuration VS Code extension that brings Go-like IDE intelligence to PostgreSQL DDL and PL/pgSQL stored functions across any .sql file in your workspace (db/tables/, db/functions/, db/migrations/, empc.sql, etc.).
Features
- Workspace-Wide Zero-Config Indexing: Automatically indexes all
CREATE TABLE, ALTER TABLE, CREATE [OR REPLACE] FUNCTION, and CREATE TRIGGER statements across .sql files in the workspace.
- Go to Definition (
F12 / Cmd+Click): Jump to functions, tables, table columns, ALTER TABLE ADD COLUMN definitions, RETURNS TABLE columns, DECLARE variables, and parameters.
- Find All References (
Shift+F12) & CodeLens: View all SQL callers and Go (db.Raw / db.Exec) callers above every function and table.
- Call Hierarchy: Inspect incoming and outgoing SQL function call trees.
- Context-Aware Auto-Complete:
- Dot completion (
m., v_account., v_row., c., x., NEW., public.) for table aliases, RETURNS TABLE function aliases, inferred RECORD variables, CTEs, and jsonb_to_record aliases.
- Function completions with parameter snippet placeholders.
- Signature Help & Inlay Hints: Live parameter popups on
( and , plus inline param_name: hints inside multi-argument function calls.
- Real-Time Static Analysis & Diagnostics:
- Syntax & PL/pgSQL block structure errors (
PG1001 – PG1004)
- Unknown tables, columns, functions, and undeclared variables (
PG2001 – PG2004)
- Function argument count and parameter datatype validation (
PG3001 – PG3002)
- Variable
:= assignment, SELECT ... INTO, RETURN QUERY SELECT (strict TEXT vs VARCHAR), INSERT, and UPDATE datatype validation (PG3003 – PG3007)
- Bare table column references in
RETURN QUERY SELECT without FROM, unused variables, and ALTER FUNCTION signature sync (PG4001 – PG4003)
Usage
# Build the extension bundle
npm run build
# Run automated tests
npm test
# Run the CLI static analyzer across all .sql files in the repository
npm run check-sql
# Package into pg-sql-intellisense.vsix
npm run package
| |