{
  "slug": "render-psql-supports-non-interactive-queries-and-output-formats-9b487113d1d1",
  "title": "render psql supports non-interactive queries and output formats",
  "tools": [
    "render"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-09T20:10:03.000Z",
  "announced_at": "2026-02-09T20:10:03.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need to run a database query from a script and capture its output, use `render psql` with `-c` and select `-o json`, `-o yaml`, or `-o text`. Pass extra `psql` flags after `--`.",
    "examples": [
      "render psql <databaseID-or-name> -c \"<SQL query>\" -o json",
      "render psql <databaseID-or-name> -c \"<SQL query>\" -o text -- --csv",
      "render psql <databaseID-or-name> -c \"<SQL query>\" -o yaml"
    ],
    "gotchas": [
      "Version: v2.8.0",
      "<databaseID-or-name>: Optional Render Postgres database ID or name; if omitted, interactive mode can prompt for a database.",
      "--command / -c (required): Execute a SQL command in non-interactive mode.",
      "-o (required): Select the output format: `json`, `yaml`, or `text`. These choices are alternatives.",
      "-- [psql args]: Pass additional flags to psql, such as `--csv`, `-t`, or `-A`."
    ]
  },
  "why_it_matters": "Run a database query from a script and capture its output.",
  "before": "Use `render psql` to open an interactive psql session; non-interactive query execution was added in v2.8.0.",
  "sources": [
    "https://github.com/render-oss/cli/releases/tag/v2.8.0",
    "https://render.com/docs/cli-reference",
    "https://render.com/changelog/render-cli-v2-8-0"
  ],
  "rank": 0.99064,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-7aeaec4fdad46eb3-0:gate",
    "evidence_hash": "5cb3690bd4c27195a7b34ff98bb2424c25c4f18244b90b641cda05c07878cf1f"
  },
  "review": {
    "draft_hash": "7cfdfb436ac4e3e5496e8f0c2ed7b4d18e45f93d6f95d36966d4dc5ddf6f012c",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.99 >= 0.9; 2 needed) and Jev gave 0.79 (>= 0.6 needed)."
  }
}
