{
  "schema": 1,
  "sqlstate": "38000",
  "condition_name": "external_routine_exception",
  "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#L300",
      "lines": "300"
    },
    {
      "id": "src.path.0",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/basebackup_to_shell/basebackup_to_shell.c",
      "sha256": "4f42cb76243182416e6c4ca50029ab82c794d297ae36759f57511f18ff110b43",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/basebackup_to_shell/basebackup_to_shell.c#L239",
      "lines": "239-243"
    },
    {
      "id": "src.path.1",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/copyfrom.c",
      "sha256": "2eacfb8e896414428a8d124921fdc38629afe55c391c0fc16bce99b2db8bd86f",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyfrom.c#L1966",
      "lines": "1966-1970"
    },
    {
      "id": "src.path.2",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "contrib/uuid-ossp/uuid-ossp.c",
      "sha256": "b09f5fb48b28df9c279780181d2f3410e34a29904eba298b93ab9166aaa8a8e4",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/uuid-ossp/uuid-ossp.c#L387",
      "lines": "130-136,297-318,387-390"
    },
    {
      "id": "src.path.3",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/pl/plpython/plpy_elog.c",
      "sha256": "707d4948e22451e4013abaf961e5dfd8b9573d709f5a47fb7e879587106cd8bf",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/pl/plpython/plpy_elog.c#L123",
      "lines": "123-140"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.path.4",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/copyto.c",
      "sha256": "f160930f5821d7320f3ac686f4edc4a7b341f84697ee5200eeff352f331c0bd5",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/copyto.c#L575",
      "lines": "575-579"
    },
    {
      "id": "src.path.5",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/pl/plperl/plperl.c",
      "sha256": "90789190fd0bf5b53773b57b8c3287c88c35fbebdfa8310acab3f2d89910e4ba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/pl/plperl/plperl.c#L2250",
      "lines": "2250-2264,2318-2330,2361-2393"
    },
    {
      "id": "src.path.6",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/pl/tcl/pltcl.c",
      "sha256": "cd9c06395a4bb6125bda553a6ecdeebdcc7922e6a12ddb84c98c0c3d1d39a172",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/pl/tcl/pltcl.c#L1036",
      "lines": "1036-1039,1402-1406"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "38000 is external_routine_exception in SQLSTATE Class 38.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes definition row, severity, and macro."
    },
    {
      "id": "resolved-path",
      "statement": "The fixed PostgreSQL 18.6 source contains the external-command, UUID-library, and PL/Perl, PL/Python, PL/Tcl report contexts and message variants described on the page.",
      "sources": [
        "src.path.0",
        "src.path.1",
        "src.path.2",
        "src.path.3",
        "src.path.4",
        "src.path.5",
        "src.path.6"
      ],
      "method": "Read the complete source context around the resolved report groups.",
      "limits": "Source confirmation is not a runtime observation in this batch."
    },
    {
      "id": "history-boundary",
      "statement": "Locked release definitions establish catalogue presence from 7.4; they do not establish a precise introducing release or runtime use.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Compare canonical release facts with the available history boundary.",
      "limits": "Definition presence is not an emitting-path observation."
    }
  ],
  "messages": [
    {
      "id": "message.basebackup-shell-failed",
      "sqlstate": "38000",
      "primary_template": "shell command \"%s\" failed",
      "detail_template": "%s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.0"
      ],
      "limits": "The command and internal wait-status detail are dynamic."
    },
    {
      "id": "message.copy-program-failed",
      "sqlstate": "38000",
      "primary_template": "program \"%s\" failed",
      "detail_template": "%s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.1",
        "src.path.4"
      ],
      "limits": "The program path and internal wait-status detail are dynamic."
    },
    {
      "id": "message.uuid-library-text",
      "sqlstate": "38000",
      "primary_template": "OSSP uuid library failure: %s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2"
      ],
      "limits": "The external UUID library text is interpolated into the primary message."
    },
    {
      "id": "message.uuid-library-code",
      "sqlstate": "38000",
      "primary_template": "OSSP uuid library failure: error code %d",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2"
      ],
      "limits": "The external UUID status code is dynamic."
    },
    {
      "id": "message.uuid-library-code-short",
      "sqlstate": "38000",
      "primary_template": "uuid library failure: %d",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2"
      ],
      "limits": "The UUID library status value is dynamic; this branch is used by the uuid-ossp fallback path."
    },
    {
      "id": "message.uuid-version-mismatch",
      "sqlstate": "38000",
      "primary_template": "uuid_create() produced a version %c UUID instead of the expected version 1",
      "severity_source": "ERROR",
      "sources": [
        "src.path.2"
      ],
      "limits": "The UUID version character is dynamic."
    },
    {
      "id": "message.plperl-no-return-item",
      "sqlstate": "38000",
      "primary_template": "didn't get a return item from function",
      "severity_source": "ERROR",
      "sources": [
        "src.path.5"
      ]
    },
    {
      "id": "message.plpython-forwarded-diagnostics",
      "sqlstate": "38000",
      "primary_template": null,
      "dynamic_format": "errmsg_internal %s; errdetail_internal %s; errcontext %s; errhint %s",
      "severity_source": "caller-selected level",
      "sources": [
        "src.path.3"
      ],
      "limits": "PL/Python forwards the underlying dynamic message and optional DETAIL, CONTEXT, and HINT; no single static primary template is asserted."
    },
    {
      "id": "message.pltcl-return-parse",
      "sqlstate": "38000",
      "primary_template": "could not parse function return value: %s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.6"
      ],
      "limits": "The parse error text is dynamic."
    },
    {
      "id": "message.pltcl-context",
      "sqlstate": "38000",
      "primary_template": "%s",
      "context_template": "%s\nin PL/Tcl function %s",
      "severity_source": "ERROR",
      "sources": [
        "src.path.6"
      ],
      "limits": "Both error text and function name are dynamic."
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "fixed-source-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "resolved-path"
      ]
    },
    {
      "scope": "history",
      "status": "unknown",
      "evidence_ids": [
        "history-boundary"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "resolved-path"
      ]
    }
  ],
  "runtime": []
}
