get_table_ddl
Retrieves the reconstructed CREATE TABLE DDL for a PostgreSQL table, including constraints and indexes, allowing you to obtain the table definition without direct database access.
Instructions
Return the reconstructed CREATE TABLE DDL for a table (PostgreSQL has no SHOW CREATE TABLE, so this is the closest supported reconstruction from the catalog, including constraints and indexes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name. | |
| schema | No | Schema name. Defaults to the server's default schema. |