{
  "schema": 1,
  "sqlstate": "27000",
  "condition_name": "triggered_data_change_violation",
  "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.trigger.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/trigger.c",
      "sha256": "0a539af85b0de1a04779f92202e7bfc77d85ae6da1747ea32527c67f39084fbd",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/trigger.c#L3404-L3407"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "27000 is the triggered_data_change_violation condition in Class 27.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes.txt row and macro mapping.",
      "limits": "This records the protocol definition and does not imply a natural PostgreSQL throw path."
    },
    {
      "id": "source-boundary",
      "statement": "tuple to be updated was already modified by an operation triggered by the current command is a source-confirmed path for 27000.",
      "sources": [
        "src.trigger.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace the fixed source call scan and classify the path before selecting a safe runner case.",
      "limits": "No representative runtime case is claimed; the path requires a specialized internal or trigger/procedure context."
    }
  ],
  "messages": [
    {
      "id": "message.triggered-data-change",
      "sqlstate": "27000",
      "primary_template": "tuple to be updated was already modified by an operation triggered by the current command",
      "severity_source": "ERROR",
      "sources": [
        "src.trigger.18.6"
      ],
      "limits": "The hint and any row identity are contextual; this is the fixed BEFORE-trigger same-tuple branch."
    },
    {
      "id": "message.triggered-data-change-hint",
      "sqlstate": "27000",
      "hint_template": "Consider using an AFTER trigger instead of a BEFORE trigger to propagate changes to other rows.",
      "severity_source": "ERROR",
      "sources": [
        "src.trigger.18.6"
      ],
      "limits": "The hint describes this source branch and is not a universal trigger migration rule."
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition-and-source-boundary",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "source-boundary"
      ],
      "notes": "No runtime SQLSTATE observation is selected for this code in batch constraints-transactions-3-4; the page remains not_run."
    }
  ],
  "runtime": []
}
