pg_manage_schema
Manage PostgreSQL schema operations: retrieve schema/table info, create/alter tables, and handle ENUM types. Supports actions like get_info, create_table, get_enums, and create_enum with detailed configuration options.
Instructions
Manage PostgreSQL schema - get schema info, create/alter tables, manage enums. Examples: operation="get_info" for table lists, operation="create_table" with tableName and columns, operation="get_enums" to list enums, operation="create_enum" with enumName and values
Input Schema
Name | Required | Description | Default |
---|---|---|---|
columns | No | Column definitions (required for create_table) | |
connectionString | No | PostgreSQL connection string (optional) | |
enumName | No | ENUM name (optional for get_enums to filter, required for create_enum) | |
ifNotExists | No | Include IF NOT EXISTS clause (for create_enum) | |
operation | Yes | Operation: get_info (schema/table info), create_table (new table), alter_table (modify table), get_enums (list ENUMs), create_enum (new ENUM) | |
operations | No | Alter operations (required for alter_table) | |
schema | No | Schema name (defaults to public) | |
tableName | No | Table name (optional for get_info to get specific table info, required for create_table/alter_table) | |
values | No | ENUM values (required for create_enum) |