pg_get_ddl
Retrieve the complete DDL of a PostgreSQL database, including CREATE TABLE statements, indexes, constraints, foreign keys, sequences, and views. Optionally filter by schema for targeted output.
Instructions
Get the complete DDL (Data Definition Language) of the database including CREATE TABLE statements, indexes, constraints, foreign keys, sequences, and views
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | Yes | Connection ID to use | |
| schema | No | Filter by schema (optional, returns all user schemas if not specified) |