{
  "schema": 1,
  "sqlstate": "25P01",
  "condition_name": "no_active_sql_transaction",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.xact.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/transam/xact.c",
      "sha256": "75b012c0b047d1dc905a30975c244beec366e45eac0dbf109fd21bcd611a8e39",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L3724-L3749"
    },
    {
      "id": "doc.savepoint.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/ref/savepoint.sgml",
      "sha256": "aa6e167d373da6118249c87404a7b2ff8be8c7df790449814f1d9dc433bbd428",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/savepoint.sgml#L68-L78",
      "docs_url": "https://www.postgresql.org/docs/18/sql-savepoint.html"
    },
    {
      "id": "src.xact.savepoint.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/transam/xact.c",
      "sha256": "75b012c0b047d1dc905a30975c244beec366e45eac0dbf109fd21bcd611a8e39",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L4418-L4424"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "25P01 is no_active_sql_transaction in Class 25.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed condition row and macro.",
      "limits": "It is distinct from the branch-transaction condition 25005."
    },
    {
      "id": "savepoint-path",
      "statement": "The fixed xact.c paths report 25P01 when SAVEPOINT, RELEASE SAVEPOINT, or ROLLBACK TO SAVEPOINT is issued without an explicit transaction block; the selected SAVEPOINT path is ERROR.",
      "sources": [
        "src.xact.savepoint.18.6",
        "doc.savepoint.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace the SAVEPOINT state branch and compare the official savepoint boundary.",
      "limits": "Other no-active paths may be WARNING or use a different statement name; this case uses the SAVEPOINT ERROR path."
    },
    {
      "id": "runtime",
      "statement": "The selected SAVEPOINT case returned 25P01 on PostgreSQL 18.6 and 10.21, stayed IDLE in autocommit mode, and completed the explicit-block repair.",
      "sources": [
        "runtime",
        "runtime.25P01-batch2-latest-20260909.latest",
        "runtime.25P01-batch2-pg10-20260909.pg10"
      ],
      "method": "Read the selected summaries and structured diagnostics.",
      "limits": "The case covers SAVEPOINT outside a transaction block, not every warning or no-active path."
    },
    {
      "id": "warning-path",
      "statement": "The fixed xact.c source also uses 25P01 for no-transaction COMMIT/ROLLBACK warnings with \"there is no transaction in progress\", while COMMIT AND CHAIN and ROLLBACK AND CHAIN use the transaction-block error form.",
      "sources": [
        "src.xact.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Read the resolved report groups at the no-transaction COMMIT/ROLLBACK and transaction-chain branches.",
      "limits": "These warning/error paths are source-backed context, not the selected SAVEPOINT runtime case."
    }
  ],
  "messages": [
    {
      "id": "savepoint",
      "sqlstate": "25P01",
      "primary_template": "%s can only be used in transaction blocks",
      "severity_source": "ERROR for the selected SAVEPOINT path; the shared dynamic form can be WARNING in other branches.",
      "sources": [
        "src.xact.savepoint.18.6"
      ],
      "limits": "The %s substitution is the statement name; the selected message is SAVEPOINT can only be used in transaction blocks."
    },
    {
      "id": "no-transaction-warning",
      "sqlstate": "25P01",
      "primary_template": "there is no transaction in progress",
      "severity_source": "WARNING",
      "sources": [
        "src.xact.18.6"
      ],
      "limits": "Used by no-transaction COMMIT/ROLLBACK branches; it is not the selected SAVEPOINT ERROR."
    }
  ],
  "usage_evidence": [
    {
      "scope": "runtime",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime",
        "runtime.25P01-batch2-latest-20260909.latest",
        "runtime.25P01-batch2-pg10-20260909.pg10"
      ]
    },
    {
      "scope": "source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "savepoint-path"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.25P01-batch2-latest-20260909.latest",
      "run_id": "25P01-batch2-latest-20260909",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "savepoint_without_transaction"
      ],
      "summary_sha256": "aa6294daccf84497125a2e823231f2f7f7c3909d16064761ae4e8d4783376027",
      "raw_sha256": "4bd89117ee074c9e6d7bc8fb0023b2dbea6cc2389c3e6956a4074b161ef0887a",
      "case_manifest": {
        "sha256": "49bc7e60ade603e07255a3096b94803423aa3a2fbd058a3aca604d4edfaf0072"
      },
      "snippet_registry": {
        "sha256": "a1ffffc778f82789f1c1ac4027a109fc76e4b315ef2e3a5bdbfc47c8f84ce951"
      },
      "observed": {
        "sqlstate": "25P01",
        "primary": "SAVEPOINT can only be used in transaction blocks",
        "after_error": "IDLE",
        "after_begin": "INTRANS",
        "final_status": "IDLE"
      }
    },
    {
      "id": "runtime.25P01-batch2-pg10-20260909.pg10",
      "run_id": "25P01-batch2-pg10-20260909",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "passed",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "savepoint_without_transaction"
      ],
      "summary_sha256": "daa3bbb7722b859f4b759e3a8421138b6e5a38cf9d3037d32629daf4c923eda4",
      "raw_sha256": "af9d34a18019d994852fe38933d1f000b0bd6f2536d63c41e6365ba8d8b26864",
      "case_manifest": {
        "sha256": "49bc7e60ade603e07255a3096b94803423aa3a2fbd058a3aca604d4edfaf0072"
      },
      "snippet_registry": {
        "sha256": "a1ffffc778f82789f1c1ac4027a109fc76e4b315ef2e3a5bdbfc47c8f84ce951"
      },
      "observed": {
        "sqlstate": "25P01",
        "primary": "SAVEPOINT can only be used in transaction blocks",
        "after_error": "IDLE",
        "after_begin": "INTRANS",
        "final_status": "IDLE"
      }
    }
  ]
}
