{
  "schema": 1,
  "sqlstate": "42701",
  "condition_name": "duplicate_column",
  "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.calls.REL_10_23",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c"
    },
    {
      "id": "src.duplicate-column.18.6",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/commands/tablecmds.c",
      "sha256": "422dc8e833df4940755973c757e338295822ba3e4c7266c40669f49f96eb15a9",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablecmds.c#L2636-L2639"
    },
    {
      "id": "src.duplicate-column.10.23",
      "kind": "upstream_source",
      "source_role": "source_call",
      "tag": "REL_10_23",
      "commit": "02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4",
      "path": "src/backend/commands/tablecmds.c",
      "sha256": "6de441c88496c6cf57a836898388085ec08bf69afd70d07acdafd6089b9b5f8c",
      "url": "https://github.com/postgres/postgres/blob/02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4/src/backend/commands/tablecmds.c#L1741-L1744"
    },
    {
      "id": "manifest.42701",
      "kind": "local_artifact",
      "source_role": "case_manifest",
      "sha256": "9f792ba437d56c9c8517dcc45582799d04c83a50180b5e290e8cc3b90c93fd7e"
    },
    {
      "id": "snippet-registry.42701",
      "kind": "local_artifact",
      "source_role": "snippet_registry",
      "sha256": "20767b2140a3242ce7450b1c3eaf0dc89b87f75fd18055d9220c8aeb2df5400f"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "statement": "42701 is the duplicate_column condition in Class 42.",
      "method": "Read fixed errcodes.txt and the locked catalogue metadata.",
      "limits": "Directory identity does not identify every backend path.",
      "sources": [
        "src.errcodes.18.6"
      ]
    },
    {
      "id": "mechanism.backend-path",
      "statement": "The fixed source calls for 42701 include the mechanism and message boundary selected for this page.",
      "method": "Trace the resolved REL_18_6 and REL_10_23 source call records at the locked commits.",
      "limits": "Other calls can use the same SQLSTATE with different context or dynamic fields.",
      "sources": [
        "src.duplicate-column.18.6",
        "src.duplicate-column.10.23"
      ]
    },
    {
      "id": "runtime.representative-case",
      "statement": "The selected duplicate_column case passed on isolated PostgreSQL 18.6 and 10.21 targets.",
      "method": "Run the shared registry case and inspect structured diagnostics, state/recovery assertions, and cleanup.",
      "limits": "This covers the selected case and targets only; it does not generalize to all drivers or intermediate releases.",
      "sources": [
        "manifest.42701",
        "snippet-registry.42701"
      ],
      "runtime": [
        "runtime.42701-syntax-latest2.latest",
        "runtime.42701-syntax-pg10.pg10"
      ]
    },
    {
      "id": "versions.catalogue-boundary",
      "statement": "The locked catalogue records 42701; runtime scope is limited to the selected targets.",
      "method": "Read generated facts and selected summaries.",
      "limits": "Definition presence is not an exact behavioral introduction.",
      "sources": [
        "src.errcodes.18.6",
        "src.calls.REL_18_6",
        "src.calls.REL_10_23"
      ]
    }
  ],
  "messages": [
    {
      "id": "message.duplicate-column",
      "primary_template": "column \"%s\" specified more than once",
      "severity_source": "explicit ERROR",
      "sqlstate": "42701",
      "sources": [
        "src.duplicate-column.18.6",
        "src.duplicate-column.10.23"
      ]
    }
  ],
  "usage_evidence": [
    {
      "scope": "SQLSTATE directory identity",
      "status": "definition_only",
      "evidence_ids": [
        "identity.class-and-condition",
        "src.errcodes.18.6"
      ]
    },
    {
      "scope": "Fixed source message/mechanism",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "mechanism.backend-path",
        "src.duplicate-column.18.6",
        "src.duplicate-column.10.23"
      ]
    },
    {
      "scope": "Observed duplicate_column on isolated targets",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime.representative-case",
        "snippet-registry.42701",
        "runtime.42701-syntax-latest2.latest",
        "runtime.42701-syntax-pg10.pg10"
      ]
    },
    {
      "scope": "Locked release presence and bounded version comparison",
      "status": "definition_only",
      "evidence_ids": [
        "versions.catalogue-boundary",
        "src.errcodes.18.6"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.42701-syntax-latest2.latest",
      "run_id": "42701-syntax-latest2",
      "target": "latest",
      "status": "passed",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "summary_sha256": "23dfe97f3c9373be57b80a6c2d86c3f8ba5467998a158fd5fb44dc4dbf6c1b73",
      "raw_sha256": "50b147ec604b0ebf828d1d31065262eb4a3dfba432b44b03a2bae2b54d02df3a",
      "case_manifest": {
        "id": "manifest.42701",
        "kind": "local_artifact",
        "source_role": "case_manifest",
        "sha256": "9f792ba437d56c9c8517dcc45582799d04c83a50180b5e290e8cc3b90c93fd7e"
      },
      "snippet_registry": {
        "id": "snippet-registry.42701",
        "kind": "local_artifact",
        "source_role": "snippet_registry",
        "sha256": "20767b2140a3242ce7450b1c3eaf0dc89b87f75fd18055d9220c8aeb2df5400f"
      },
      "environment": {
        "TimeZone": "Asia/Shanghai",
        "backend_pid": 2968,
        "binary": {
          "bindir": "/opt/homebrew/Cellar/postgresql@18/18.6/bin",
          "pg_config": "/opt/homebrew/bin/pg_config",
          "pg_config_version": "PostgreSQL 18.6 (Homebrew)",
          "postgres": "/opt/homebrew/Cellar/postgresql@18/18.6/bin/postgres"
        },
        "connection_scope": "runner-owned localhost port",
        "current_user": "runner",
        "docker": {},
        "lc_messages": "C",
        "libpq_version": "18.6",
        "locale": "en_US.UTF-8",
        "log_destination": "csvlog,jsonlog",
        "log_error_verbosity": "verbose",
        "log_min_error_statement": "error",
        "log_min_messages": "error",
        "logging_collector": "on",
        "machine": "arm64",
        "max_connections": "100",
        "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
        "psycopg_version": "3.3.5",
        "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
        "server_encoding": "UTF8",
        "server_version": "18.6 (Homebrew)",
        "server_version_num": "180006",
        "target_kind": "latest",
        "wal_level": "logical"
      },
      "observed": {
        "column_count": 2,
        "connection_autocommit": true,
        "diagnostic": {
          "column_name": null,
          "constraint_name": null,
          "context": null,
          "datatype_name": null,
          "exception_type": "DuplicateColumn",
          "internal_position": null,
          "internal_query": null,
          "message_detail": null,
          "message_hint": null,
          "message_primary": "column \"id\" specified more than once",
          "schema_name": null,
          "severity": "ERROR",
          "severity_nonlocalized": "ERROR",
          "source_file": "tablecmds.c",
          "source_function": "MergeAttributes",
          "source_line": "2639",
          "sqlstate": "42701",
          "statement_position": null,
          "table_name": null,
          "text": "column \"id\" specified more than once"
        },
        "failed_status": "IDLE",
        "repair_status": "IDLE"
      },
      "assertions": [
        {
          "expected": "42701",
          "name": "42701 SQLSTATE",
          "observed": "42701",
          "passed": true
        },
        {
          "expected": "ERROR",
          "name": "42701 ERROR severity",
          "observed": "ERROR",
          "passed": true
        },
        {
          "expected": "column \"id\" specified more than once",
          "name": "42701 primary diagnostic",
          "observed": "column \"id\" specified more than once",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "duplicate-column error leaves session usable",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": {
            "columns": 2,
            "status": "IDLE"
          },
          "name": "unique column definitions repair table",
          "observed": {
            "columns": 2,
            "status": "IDLE"
          },
          "passed": true
        }
      ],
      "cleanup": {
        "errors": [],
        "passed": true
      }
    },
    {
      "id": "runtime.42701-syntax-pg10.pg10",
      "run_id": "42701-syntax-pg10",
      "target": "pg10",
      "status": "passed",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "summary_sha256": "e8485e813c64d48c0a8aaabea9e3844e2aaa28b2817f1ee04362e4a85d48213b",
      "raw_sha256": "df7ce42bcd46bac5e7e750222372f9b45ea0da1b0e97da258828b484e0ba0856",
      "case_manifest": {
        "id": "manifest.42701",
        "kind": "local_artifact",
        "source_role": "case_manifest",
        "sha256": "9f792ba437d56c9c8517dcc45582799d04c83a50180b5e290e8cc3b90c93fd7e"
      },
      "snippet_registry": {
        "id": "snippet-registry.42701",
        "kind": "local_artifact",
        "source_role": "snippet_registry",
        "sha256": "20767b2140a3242ce7450b1c3eaf0dc89b87f75fd18055d9220c8aeb2df5400f"
      },
      "environment": {
        "TimeZone": "Etc/UTC",
        "backend_pid": 80,
        "binary": {},
        "connection_scope": "runner-owned localhost port",
        "current_user": "postgres",
        "docker": {
          "architecture": "arm64",
          "command": "/usr/local/bin/docker",
          "digest": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
          "id": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
          "image": "postgres:10",
          "image_created": "2022-06-23T09:11:18.374607054Z",
          "image_ref": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
          "log_destination": "csvlog",
          "os": "linux",
          "repo_digests": [
            "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc"
          ]
        },
        "lc_messages": "en_US.utf8",
        "libpq_version": "18.6",
        "locale": "en_US.UTF-8",
        "log_destination": "csvlog",
        "log_error_verbosity": "verbose",
        "log_min_error_statement": "error",
        "log_min_messages": "error",
        "logging_collector": "on",
        "machine": "arm64",
        "max_connections": "100",
        "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
        "psycopg_version": "3.3.5",
        "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
        "server_encoding": "UTF8",
        "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
        "server_version_num": "100021",
        "target_kind": "pg10",
        "wal_level": "logical"
      },
      "observed": {
        "column_count": 2,
        "connection_autocommit": true,
        "diagnostic": {
          "column_name": null,
          "constraint_name": null,
          "context": null,
          "datatype_name": null,
          "exception_type": "DuplicateColumn",
          "internal_position": null,
          "internal_query": null,
          "message_detail": null,
          "message_hint": null,
          "message_primary": "column \"id\" specified more than once",
          "schema_name": null,
          "severity": "ERROR",
          "severity_nonlocalized": "ERROR",
          "source_file": "tablecmds.c",
          "source_function": "MergeAttributes",
          "source_line": "1744",
          "sqlstate": "42701",
          "statement_position": null,
          "table_name": null,
          "text": "column \"id\" specified more than once"
        },
        "failed_status": "IDLE",
        "repair_status": "IDLE"
      },
      "assertions": [
        {
          "expected": "42701",
          "name": "42701 SQLSTATE",
          "observed": "42701",
          "passed": true
        },
        {
          "expected": "ERROR",
          "name": "42701 ERROR severity",
          "observed": "ERROR",
          "passed": true
        },
        {
          "expected": "column \"id\" specified more than once",
          "name": "42701 primary diagnostic",
          "observed": "column \"id\" specified more than once",
          "passed": true
        },
        {
          "expected": "IDLE",
          "name": "duplicate-column error leaves session usable",
          "observed": "IDLE",
          "passed": true
        },
        {
          "expected": {
            "columns": 2,
            "status": "IDLE"
          },
          "name": "unique column definitions repair table",
          "observed": {
            "columns": 2,
            "status": "IDLE"
          },
          "passed": true
        }
      ],
      "cleanup": {
        "errors": [],
        "passed": true
      }
    }
  ]
}
