{
  "schema": 1,
  "sqlstate": "2BP01",
  "condition_name": "dependent_objects_still_exist",
  "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.dependency.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/catalog/dependency.c",
      "sha256": "1878f848dae03e08424a47a09508f3443227ad67c4bc5e0aba3ec9655d015b74",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/dependency.c#L1148-L1154"
    },
    {
      "id": "doc.drop.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/ref/drop_table.sgml",
      "sha256": "0eddfa552ed02df4fda6409692198756e616afb805e52cc4caefa84f928354e8",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/drop_table.sgml",
      "docs_url": "https://www.postgresql.org/docs/18/sql-droptable.html"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "2BP01 is the dependent_objects_still_exist condition in Class 2B.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes.txt row and macro mapping.",
      "limits": "Other dependent-privilege and typed-object paths use the same condition with different dynamic messages."
    },
    {
      "id": "dependency-path",
      "statement": "The dependency walker reports that an object cannot be dropped while other objects depend on it and supplies a CASCADE hint.",
      "sources": [
        "src.dependency.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace reportDependentObjects and its dynamic DETAIL/HINT assembly.",
      "limits": "DETAIL names the dependency graph dynamically; it is not a fixed format for every object kind."
    },
    {
      "id": "repair-order",
      "statement": "A safe repair identifies the dependent view and drops it intentionally before dropping its base table; CASCADE is an explicit policy choice, not a universal repair.",
      "sources": [
        "doc.drop.18.6"
      ],
      "method": "Use a view-to-table dependency and the shared registry repair sequence.",
      "limits": "Other dependency types and ownership/privilege checks may require a different order or privileges."
    },
    {
      "id": "runtime",
      "statement": "The selected 2BP01 case passed on PostgreSQL 18.6 and 10.21 with the structured SQLSTATE, transaction-state, and repair assertions recorded in the runtime entries.",
      "sources": [
        "runtime.2BP01-batch34-final-20260909.latest",
        "runtime.2BP01-batch34-final-20260909.pg10"
      ],
      "method": "Read the selected runner summaries and raw outputs tied to the shared snippet registry.",
      "limits": "The INERROR then IDLE assertion belongs to the selected explicit BEGIN/ROLLBACK block; autocommit statements have no surrounding block to preserve."
    }
  ],
  "messages": [
    {
      "id": "message.dependent-object",
      "sqlstate": "2BP01",
      "primary_template": "cannot drop %s because other objects depend on it",
      "detail_template": "%s (dynamic internal detail)",
      "hint_template": "Use DROP ... CASCADE to drop the dependent objects too.",
      "severity_source": "ERROR",
      "sources": [
        "src.dependency.18.6"
      ],
      "limits": "Object descriptions and dependency detail are dynamically assembled."
    }
  ],
  "usage_evidence": [
    {
      "scope": "2BP01-runtime",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime",
        "runtime.2BP01-batch34-final-20260909.latest",
        "runtime.2BP01-batch34-final-20260909.pg10"
      ]
    },
    {
      "scope": "condition-and-source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "dependency-path",
        "repair-order"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.2BP01-batch34-final-20260909.latest",
      "run_id": "2BP01-batch34-final-20260909",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "status": "passed",
      "cases": [
        "dependent_object_drop_recovery"
      ],
      "summary_sha256": "5152619160085d99208030f2935dd2621449df65b7927c1a4fff9d2230577d85",
      "raw_sha256": "e4de5657bb564cb931134ce3bd149106f3c7f4df3287665e70ab6711a63d682d",
      "snippet_registry": {
        "sha256": "899e4fd9fb002fc293bd9efee0204e4f2622968c6d9460ad05eb9a0ebd3bac69"
      },
      "case_manifest": {
        "sha256": "4e428d2ab267974589385038a637b43d3493b60fd0dd5243fd71862b9a7e7ccc"
      },
      "observed": {
        "sqlstate": "2BP01",
        "primary": "cannot drop table c2bp01_dependent_object_drop_recovery.base_items because other objects depend on it",
        "severity": "ERROR",
        "statuses": {
          "after_error": "INERROR",
          "after_repair": "IDLE",
          "after_rollback": "IDLE"
        },
        "repair": {
          "remaining_relations": [
            null,
            null
          ]
        },
        "connection_autocommit": true
      }
    },
    {
      "id": "runtime.2BP01-batch34-final-20260909.pg10",
      "run_id": "2BP01-batch34-final-20260909",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "status": "passed",
      "cases": [
        "dependent_object_drop_recovery"
      ],
      "summary_sha256": "51adc1a279429396fad88b577f2b794ef29c4875d07d26e5b9cd2eddae5fd451",
      "raw_sha256": "660365c646eec69fceb84b6390329b96b18db870ca7e1b7c8d0d5da9989a631a",
      "snippet_registry": {
        "sha256": "899e4fd9fb002fc293bd9efee0204e4f2622968c6d9460ad05eb9a0ebd3bac69"
      },
      "case_manifest": {
        "sha256": "4e428d2ab267974589385038a637b43d3493b60fd0dd5243fd71862b9a7e7ccc"
      },
      "observed": {
        "sqlstate": "2BP01",
        "primary": "cannot drop table c2bp01_dependent_object_drop_recovery.base_items because other objects depend on it",
        "severity": "ERROR",
        "statuses": {
          "after_error": "INERROR",
          "after_repair": "IDLE",
          "after_rollback": "IDLE"
        },
        "repair": {
          "remaining_relations": [
            null,
            null
          ]
        },
        "connection_autocommit": true
      }
    }
  ]
}
