pg_manage_functions
Manage PostgreSQL functions with a single tool to get, create, or drop functions. Specify operation, function name, schema, parameters, return type, and body for precise control and automation.
Instructions
Manage PostgreSQL functions - get, create, or drop functions with a single tool. Examples: operation="get" to list functions, operation="create" with functionName="test_func", parameters="" (empty for no params), returnType="TEXT", functionBody="SELECT 'Hello'"
Input Schema
Name | Required | Description | Default |
---|---|---|---|
cascade | No | Whether to include CASCADE clause (for drop operation) | |
connectionString | No | PostgreSQL connection string (optional) | |
functionBody | No | Function body code (required for create operation) | |
functionName | No | Name of the function (required for create/drop, optional for get to filter) | |
ifExists | No | Whether to include IF EXISTS clause (for drop operation) | |
language | No | Function language (defaults to plpgsql for create) | |
operation | Yes | Operation to perform: get (list/info), create (new function), or drop (remove function) | |
parameters | No | Function parameters - required for create operation, required for drop when function is overloaded. Use empty string "" for functions with no parameters | |
replace | No | Whether to replace the function if it exists (for create operation) | |
returnType | No | Return type of the function (required for create operation) | |
schema | No | Schema name (defaults to public) | |
security | No | Function security context (defaults to INVOKER for create) | |
volatility | No | Function volatility (defaults to VOLATILE for create) |