ct_psql
Run SQL inside a container with psql, using dry-run and confirmation to plan changes, or bypass with confirm flag. Optionally create an undo snapshot before executing mutations.
Instructions
Run SQL via psql inside a container (as the db OS user). MUTATION-CAPABLE.
Dry-run by default: without confirm=True you get a PLAN — the SQL plus a heuristic read/DML/DDL classification (advisory only) — recorded to the ledger. Re-call with confirm=True to execute.
snapshot=True (UNDO): take an auto-undo snapshot first and WAIT for it; if it can't be made the
SQL is NOT run (fail-closed). On success the result carries an undo_point (revert via pve_rollback).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | postgres | |
| sql | Yes | ||
| ctid | Yes | ||
| confirm | No | ||
| snapshot | No | ||
| proximo_target | No | Which configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |