{
  "schema": 1,
  "sqlstate": "P0003",
  "condition_name": "too_many_rows",
  "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#L493",
      "lines": "493"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.path.plpgsql",
      "kind": "upstream_source",
      "source_role": "resolved_report_context",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/pl/plpgsql/src/pl_exec.c",
      "sha256": "0df3c70a6bccf6dddf443fb99e152a16a67009827c44a820597e98e585cb8b20",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/pl/plpgsql/src/pl_exec.c#L4215-L4220",
      "lines": "4215-4220,4394-4410,4590-4596"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "P0003 is too_many_rows in PostgreSQL-specific Class P0.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed definition row."
    },
    {
      "id": "strict-query",
      "statement": "PL/pgSQL fixed paths report `query returned more than one row`; the strict path may include `parameters: %s` and the source provides the hint `Make sure the query returns a single row, or use LIMIT 1.`.",
      "sources": [
        "src.path.plpgsql"
      ],
      "method": "Read both report groups, their conditional detail, hint, and errlevel."
    },
    {
      "id": "severity-boundary",
      "statement": "For SELECT INTO-style checked queries, plpgsql.extra_errors selecting too_many_rows takes precedence and sets the extra check to ERROR; if it is not selected, plpgsql.extra_warnings selecting too_many_rows sets WARNING. Strict or modifying-statement paths use ERROR regardless, and print_strict_params controls the optional parameters detail.",
      "sources": [
        "src.path.plpgsql"
      ],
      "method": "Read the fixed too_many_rows_level assignment, row-count branch, errlevel selection, and detail condition.",
      "limits": "The hint is present on the SELECT INTO-style branch; the dynamic-execute path has the same primary/detail but no hint in the cited report group."
    }
  ],
  "messages": [
    {
      "id": "message.too-many-rows",
      "sqlstate": "P0003",
      "primary_template": "query returned more than one row",
      "detail_template": "parameters: %s",
      "hint_template": "Make sure the query returns a single row, or use LIMIT 1.",
      "severity_source": "ERROR or source-selected errlevel",
      "sources": [
        "src.path.plpgsql"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "definition",
      "status": "definition_only",
      "evidence_ids": [
        "identity"
      ]
    },
    {
      "scope": "plpgsql-path",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "strict-query"
      ]
    },
    {
      "scope": "severity",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "severity-boundary"
      ]
    },
    {
      "scope": "natural-runtime",
      "status": "unknown",
      "evidence_ids": [
        "strict-query"
      ]
    }
  ],
  "runtime": []
}
