Documentation

DPG documentation — getting started, language fundamentals, schema objects, migrations, CLI, and plugin API.
SectionDescription
Get StartedIntroduction, installation, quick start, editor integration
FundamentalsTwo-part syntax, project structure, macros, snapshots and diffing
Schema ObjectsEvery PostgreSQL object type with DPG source and generated SQL
Access ControlRoles, grants, revocations, default privileges
Advanced ObjectsFull-text search, logical replication, operators, casts, foreign data, and more
MigrationsLifecycle directives, linting rules, drift detection
CLI ReferenceAll dpg commands with flags and examples
Extending DPGPlugin API for custom linters, snapshot stores, and apply executors

Getting Started

Install DPG and create your first project

Fundamentals

Core concepts: two-part syntax, project structure, macros, snapshot-driven diffing, and name maps.

Schema Objects

Every PostgreSQL object type DPG can declare, with the DPG source and generated SQL for each.

Access Control

Roles, grants, revocations, and default privileges.

Advanced Objects

Full-text search, logical replication, event triggers, collations, operators, casts, statistics, foreign data, and tablespaces.

Migrations

Lifecycle directives, linting, and drift detection.

CLI Reference

All dpg commands with flags and examples.

Extending DPG

Use the pkg/dpg public API to extend DPG with custom linters, snapshot stores, and apply executors.