{
  "schema": 1,
  "sqlstate": "23505",
  "condition_name": "unique_violation",
  "sources": [
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.errcodes.18.6",
      "location": "lines 235-241",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.nbtinsert.18.6",
      "location": "lines 640-674",
      "path": "src/backend/access/nbtree/nbtinsert.c",
      "sha256": "199671bec6b07b80100ea41632cef4b03a9525df75a2ede2b8fe155b637dcba7",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L640-L674"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.genam.18.6",
      "location": "lines 155-275",
      "path": "src/backend/access/index/genam.c",
      "sha256": "11897b1d8b1ae1f4a1bef9a72e740da7aa83579abf84e4ca5ebacd6530874c28",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/genam.c#L155-L275"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.tuplesortvariants.18.6",
      "location": "lines 1670-1694",
      "path": "src/backend/utils/sort/tuplesortvariants.c",
      "sha256": "f160e11ec100be7e05db8abba7587e8fd0e092110d56f917d2d4dac0a58261ca",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/sort/tuplesortvariants.c#L1670-L1694"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "src.logical-conflict.18.6",
      "location": "lines 102-131, 168-180",
      "path": "src/backend/replication/logical/conflict.c",
      "sha256": "1dc6959872c84bc0d0b402ab48c4050dd961185574971633bd698eadc1a56347",
      "tag": "REL_18_6",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/conflict.c#L102-L180"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.insert.18.6",
      "location": "lines 363-430, 564-577",
      "path": "doc/src/sgml/ref/insert.sgml",
      "sha256": "f93403779fb1d980cd5995a1e2741bbdae8404584407610f9aba33ec4724a39f",
      "tag": "REL_18_6",
      "url": "https://www.postgresql.org/docs/18/sql-insert.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.create-index.18.6",
      "location": "lines 620-683",
      "path": "doc/src/sgml/ref/create_index.sgml",
      "sha256": "3698f11c6f447d127e4624a1a845dee4d5146b8337ddc6d895a7962e676717f8",
      "tag": "REL_18_6",
      "url": "https://www.postgresql.org/docs/18/sql-createindex.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.protocol.18",
      "location": "ErrorResponse field reference",
      "path": "doc/src/sgml/protocol.sgml",
      "sha256": "2531c535a61c7d3bb15ea328aa249317a3d2cf069f5d0d945dce428af845ddfc",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/protocol-error-fields.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.logging.18",
      "location": "CSV and JSON logging fields",
      "path": "doc/src/sgml/config.sgml",
      "sha256": "19c5d1126df83008f073ef52fcb45caf8ec511c6ac1ae231def833ea1711d0c9",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/runtime-config-logging.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.mvcc.18",
      "location": "serialization and deadlock failure handling",
      "path": "doc/src/sgml/mvcc.sgml",
      "sha256": "4b7bf77ee0af4b86052330ff2421d567df3604b75fe7d4f522bec84fdea87340",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/mvcc-serialization-failure-handling.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.plpgsql.18",
      "location": "EXCEPTION blocks and upsert example",
      "path": "doc/src/sgml/plpgsql.sgml",
      "sha256": "43d705adbded343336341fd3e34ea8940432e8a8211f737d36ba3041ad0a4a51",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/plpgsql-control-structures.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.sequence.18",
      "location": "setval(regclass,bigint[,boolean])",
      "path": "doc/src/sgml/func.sgml",
      "sha256": "05d03f505dc3c3b4fb2b3a6e8ed3275c425306a8ff20dd9548e838c26bbb968a",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/functions-sequence.html"
    },
    {
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "id": "doc.transactions.18",
      "location": "savepoint and transaction recovery",
      "path": "doc/src/sgml/xact.sgml",
      "sha256": "b48fbe8bd02ce3d1181a350c88c8baa6e11c73edc90a936e77b180daef328c5c",
      "tag": "PG18-docs",
      "url": "https://www.postgresql.org/docs/18/tutorial-transactions.html"
    }
  ],
  "claims": [
    {
      "id": "identity.class-and-condition",
      "limits": "This establishes directory identity; it does not assert that every possible call site has been executed.",
      "method": "Read the frozen errcodes.txt row and section.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "statement": "23505 is the unique_violation condition in Class 23 integrity_constraint_violation."
    },
    {
      "id": "runtime.dml-template",
      "limits": "The key detail is conditional on permission/RLS and available key values.",
      "method": "Trace ereport and BuildIndexValueDescription in the fixed source snapshot; compare with dml_unique_conflict and diagnostic_visibility runs.",
      "sources": [
        "src.nbtinsert.18.6",
        "src.genam.18.6"
      ],
      "statement": "The nbtree unique-check path emits SQLSTATE 23505 with duplicate key value violates unique constraint and, when visible, Key ... already exists."
    },
    {
      "id": "runtime.protocol-fields",
      "limits": "Log formats can gain fields in later releases; constraint_name is not inferred as a standard CSV/JSON key from a protocol field. The earlier full run is retained as a historical audit record but its first-record log_fields selection is excluded from this claim.",
      "method": "Read the protocol field table and CSV/JSON logging field tables; inspect the records selected by the corrected log_fields run using backend PID, schema, table, constraint, message, and detail.",
      "sources": [
        "doc.protocol.18",
        "doc.logging.18"
      ],
      "statement": "schema_name, table_name, and constraint_name are ErrorResponse object fields, while standard CSV/JSON logs expose SQLSTATE, message, and detail under their logging schemas."
    },
    {
      "id": "runtime.index-build-template",
      "limits": "The invalid-state observation is limited to the duplicate scan failure in this run; other CIC failure stages require separate tests.",
      "method": "Read the index-build ereport and concurrent-build phases; inspect pg_class/pg_index after both real failures.",
      "sources": [
        "src.tuplesortvariants.18.6",
        "doc.create-index.18.6"
      ],
      "statement": "Unique index construction uses the separate could not create unique index template; a duplicate found in this CIC scan leaves an invalid index row, while this regular failed build leaves no row after rollback."
    },
    {
      "id": "runtime.logical-apply-sqlstate",
      "limits": "No publisher/subscriber topology was run in this batch, so this is source/documentation evidence rather than a runtime observation.",
      "method": "Read ReportApplyConflict and errcode_apply_conflict in the fixed source snapshot and compare the official conflict documentation.",
      "sources": [
        "src.logical-conflict.18.6"
      ],
      "statement": "PG18 logical apply classifies insert_exists, update_exists, and multiple_unique_conflicts and maps those conflict paths to SQLSTATE 23505."
    },
    {
      "id": "runtime.tx-contexts",
      "limits": "Connection status names are captured through psycopg 3; other clients may expose equivalent states differently.",
      "method": "Read transaction and PL/pgSQL contracts and assert status transitions in explicit_tx_abort_recovery, savepoint_recovery, deferred_commit_conflict, and plpgsql_exception_recovery.",
      "sources": [
        "doc.transactions.18",
        "doc.plpgsql.18"
      ],
      "statement": "A 23505 aborts an explicit transaction until rollback, can be isolated with ROLLBACK TO SAVEPOINT, can surface at COMMIT for a deferred unique constraint, and can be caught by a PL/pgSQL EXCEPTION subtransaction."
    },
    {
      "id": "runtime.retry-boundary",
      "limits": "The case demonstrates the conflict and lock ordering, not that a particular application transaction is safe to retry.",
      "method": "Read the official serialization-failure handling guidance and run an explicit lock-synchronized concurrent unique conflict.",
      "sources": [
        "doc.mvcc.18"
      ],
      "statement": "PostgreSQL documents cases where 23505 from concurrent key selection can be retried, but the retry must include the complete transaction and may remain a persistent conflict."
    },
    {
      "id": "runtime.on-conflict-scope",
      "limits": "Whether DO NOTHING or DO UPDATE is correct remains a business policy; idempotency requires request and existing-result validation.",
      "method": "Read conflict-target rules and execute the case with a pre-existing phone row.",
      "sources": [
        "doc.insert.18.6"
      ],
      "statement": "ON CONFLICT (email) only handles its inferred arbiter; a phone-only collision still raises 23505, while omitted-target DO NOTHING handles a usable unique conflict."
    },
    {
      "id": "runtime.sequence-repair-limit",
      "limits": "Empty tables, sequence identity, bounds, cache, non-default ownership and concurrent writers need separate checks.",
      "method": "Read setval semantics and execute START 100 INCREMENT 7 with a writer-free case schema.",
      "sources": [
        "doc.sequence.18"
      ],
      "statement": "setval(max(id), true) advances the next value in the controlled non-default increment case, but it is not a universal sequence repair."
    },
    {
      "id": "runtime.nulls-choice",
      "limits": "The case covers the DDL choice, not an upgrade of an existing catalog across every release.",
      "method": "Execute an explicit NULLS NOT DISTINCT constraint on PG18 and mark the PG10 syntax as not applicable.",
      "sources": [
        "doc.insert.18.6"
      ],
      "statement": "UNIQUE NULLS NOT DISTINCT is an explicit PG15+ declaration; the default remains NULLS DISTINCT and is not changed merely by upgrading."
    },
    {
      "id": "runtime.detail-visibility",
      "limits": "Other privileges, RLS policies, expression indexes, and server configuration can change which fields are visible.",
      "method": "Trace ACL/RLS checks and execute diagnostic_visibility with INSERT-only privilege.",
      "sources": [
        "src.genam.18.6"
      ],
      "statement": "A role without SELECT privilege on unique key columns can receive SQLSTATE and protocol object fields while the key DETAIL is omitted."
    },
    {
      "id": "runtime.version-boundary",
      "statement": "On the fixed version-boundary registry case, PostgreSQL 14.24 accepts two ordinary NULLs but rejects UNIQUE NULLS NOT DISTINCT with syntax error 42601 and no 23505; PostgreSQL 15.19 accepts the declaration and raises 23505 on the second NULL, then remains IDLE for the valid repair.",
      "sources": [
        "doc.insert.18.6",
        "runtime.23505-boundary-pg14-20260909.pg14",
        "runtime.23505-boundary-pg15-20260909.pg15"
      ],
      "method": "Compare the two fixed version-boundary summaries for the same registry case, including ordinary NULL behavior, explicit declaration result, transaction status, and repair count.",
      "limits": "This is a bounded PG14.24/PG15.19 comparison for the explicit NULLS NOT DISTINCT case. The PG14 syntax error is not 23505 coverage, and the result does not replace the selected base 18.6/10.21 case counts or establish every intermediate release."
    }
  ],
  "messages": [
    {
      "detail_template": "Key %s already exists.",
      "id": "message.dml.nbtree",
      "limits": "Template values and DETAIL depend on relation name and diagnostic visibility.",
      "primary_template": "duplicate key value violates unique constraint \"%s\"",
      "severity_source": "E",
      "sources": [
        "src.nbtinsert.18.6"
      ],
      "sqlstate": "23505"
    },
    {
      "detail_template": "Key %s is duplicated.",
      "id": "message.index-build",
      "limits": "This is the unique-index build path, not the ordinary DML template.",
      "primary_template": "could not create unique index \"%s\"",
      "severity_source": "E",
      "sources": [
        "src.tuplesortvariants.18.6"
      ],
      "sqlstate": "23505"
    },
    {
      "detail_template": "%s",
      "id": "message.logical-apply",
      "limits": "The detail is dynamically assembled in err_detail.data and passed through errdetail_internal(\"%s\", err_detail.data); this is not a fixed user-facing template. The PG18 conflict label is source-confirmed; this batch did not run logical replication.",
      "primary_template": "conflict detected on relation \"%s.%s\": conflict=%s",
      "sources": [
        "src.logical-conflict.18.6"
      ],
      "sqlstate": "23505"
    }
  ],
  "usage_evidence": [
    {
      "evidence_ids": [
        "runtime.23505-final-20260909.latest",
        "runtime.23505-final-20260909.pg10",
        "runtime.23505-snippet-contract-20260909.latest",
        "runtime.23505-snippet-contract-20260909.pg10",
        "runtime.23505-log-fields-final-20260909.latest",
        "runtime.23505-log-fields-final-20260909.pg10",
        "runtime.23505-diagnostic-snippet-20260909.latest",
        "runtime.23505-diagnostic-snippet-20260909.pg10",
        "runtime.23505-explicit-manual-final-20260909.latest",
        "runtime.23505-explicit-manual-final-20260909.pg10",
        "runtime.23505-savepoint-manual-final-20260909.latest",
        "runtime.23505-savepoint-manual-final-20260909.pg10"
      ],
      "notes": "The accepted full run covers all twelve case statuses; the earlier log_fields first-record selection is retained as historical audit data, while the targeted log-fields run proves exact backend/schema/table/constraint/message/detail correlation on both targets. The manual-boundary run proves the registry BEGIN/ROLLBACK/COMMIT sequence with autocommit=True on both targets.",
      "scope": "Selected ordinary DML, transaction recovery, and registry excerpts by case/target",
      "status": "observed_runtime"
    },
    {
      "evidence_ids": [
        "runtime.logical-apply-sqlstate",
        "src.logical-conflict.18.6"
      ],
      "notes": "No logical replication topology was started; the detail value is dynamic err_detail.data, not a fixed template.",
      "scope": "Logical apply conflict labels and SQLSTATE mapping",
      "status": "source_path_confirmed"
    },
    {
      "evidence_ids": [
        "identity.class-and-condition",
        "src.errcodes.18.6"
      ],
      "notes": "The directory row defines the condition and class; it does not exercise every emitting path.",
      "scope": "SQLSTATE directory identity",
      "status": "definition_only"
    },
    {
      "scope": "nulls-not-distinct-pg15-boundary",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime.version-boundary",
        "runtime.23505-boundary-pg15-20260909.pg15"
      ],
      "notes": "The separate PG15.19 boundary case observed a natural 23505 after explicit UNIQUE NULLS NOT DISTINCT; it is excluded from the base 18.6/10.21 counts."
    },
    {
      "scope": "nulls-not-distinct-pg14-availability",
      "status": "definition_only",
      "evidence_ids": [
        "runtime.version-boundary",
        "runtime.23505-boundary-pg14-20260909.pg14"
      ],
      "notes": "PG14.24 rejected the explicit syntax with 42601 after accepting ordinary duplicate NULLs; this establishes availability comparison only and is not 23505 runtime coverage."
    }
  ],
  "runtime": [
    {
      "cases": [
        "deferred_commit_conflict",
        "concurrent_unique_conflict",
        "nulls_not_distinct",
        "index_build_conflict",
        "diagnostic_visibility"
      ],
      "id": "runtime.23505-final-20260909.latest",
      "run_id": "23505-final-20260909",
      "selection_status": "selected_for_unreplaced_cases",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "target": "latest",
      "limits": "The selected cases are the full run scenarios not replaced by a more targeted final record; its former log_fields selection is excluded because the targeted run provides the exact event correlation."
    },
    {
      "cases_not_applicable": [
        "nulls_not_distinct"
      ],
      "cases_passed": 11,
      "id": "runtime.23505-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "run_id": "23505-final-20260909",
      "selection_status": "selected_for_unreplaced_cases",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "passed",
      "target": "pg10",
      "cases": [
        "deferred_commit_conflict",
        "concurrent_unique_conflict",
        "index_build_conflict",
        "diagnostic_visibility"
      ],
      "limits": "The selected cases are the full run scenarios not replaced by a more targeted final record; its former log_fields selection is excluded because the targeted run provides the exact event correlation."
    },
    {
      "cases": [
        "plpgsql_exception_recovery",
        "on_conflict_target_scope",
        "sequence_lag_repair"
      ],
      "id": "runtime.23505-snippet-contract-20260909.latest",
      "run_id": "23505-snippet-contract-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "target": "latest",
      "selection_status": "selected_for_registry_snippets",
      "limits": "The selected cases are the registry-backed PL/pgSQL, ON CONFLICT, and sequence excerpts; explicit transaction and savepoint cases use the manual-boundary runs below."
    },
    {
      "cases": [
        "plpgsql_exception_recovery",
        "on_conflict_target_scope",
        "sequence_lag_repair"
      ],
      "id": "runtime.23505-snippet-contract-20260909.pg10",
      "run_id": "23505-snippet-contract-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "passed",
      "target": "pg10",
      "selection_status": "selected_for_registry_snippets",
      "limits": "The selected cases are the registry-backed PL/pgSQL, ON CONFLICT, and sequence excerpts; explicit transaction and savepoint cases use the manual-boundary runs below."
    },
    {
      "cases": [
        "log_fields"
      ],
      "id": "runtime.23505-log-fields-final-20260909.latest",
      "observed": {
        "backend_pid": 60638,
        "correlation": "Both collector records match this case backend PID, schema, table, constraint, SQLSTATE, primary message, and DETAIL.",
        "csv_record": {
          "detail": "Key (token)=(logged) already exists.",
          "message": "duplicate key value violates unique constraint \"logged_items_token_key\"",
          "process_id": "60638",
          "query": "INSERT INTO \"c23505_log_fields\".\"logged_items\" VALUES (2, 'logged')",
          "sql_state_code": "23505"
        },
        "json_record": {
          "detail": "Key (token)=(logged) already exists.",
          "message": "duplicate key value violates unique constraint \"logged_items_token_key\"",
          "pid": 60638,
          "state_code": "23505",
          "statement": "INSERT INTO \"c23505_log_fields\".\"logged_items\" VALUES (2, 'logged')"
        },
        "trigger": {
          "constraint_name": "logged_items_token_key",
          "message_detail": "Key (token)=(logged) already exists.",
          "message_primary": "duplicate key value violates unique constraint \"logged_items_token_key\"",
          "schema_name": "c23505_log_fields",
          "sqlstate": "23505",
          "table_name": "logged_items"
        }
      },
      "raw_sha256": "91945d2220cb85882275675810fb9b85382e99a6b25b2e81e6d06e7751b8553f",
      "run_id": "23505-log-fields-final-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "4f398c31188efa509cc59f010e4cbac23751a48deac973a027ecb66903c8c817",
      "target": "latest",
      "selection_status": "selected_exact_log_correlation",
      "limits": "This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger."
    },
    {
      "cases": [
        "log_fields"
      ],
      "id": "runtime.23505-log-fields-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "observed": {
        "backend_pid": 81,
        "correlation": "The CSV collector record matches this case backend PID, schema, table, constraint, SQLSTATE, primary message, and DETAIL; PG10 has no JSON logging output in this target configuration.",
        "csv_record": {
          "detail": "Key (token)=(logged) already exists.",
          "message": "duplicate key value violates unique constraint \"logged_items_token_key\"",
          "process_id": "81",
          "query": "INSERT INTO \"c23505_log_fields\".\"logged_items\" VALUES (2, 'logged')",
          "sql_state_code": "23505"
        },
        "json_record": null,
        "trigger": {
          "constraint_name": "logged_items_token_key",
          "message_detail": "Key (token)=(logged) already exists.",
          "message_primary": "duplicate key value violates unique constraint \"logged_items_token_key\"",
          "schema_name": "c23505_log_fields",
          "sqlstate": "23505",
          "table_name": "logged_items"
        }
      },
      "raw_sha256": "fc52475937c24be583212464ff74a70603118680f5d39b7e2938118473223711",
      "run_id": "23505-log-fields-final-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "d24ef7ce7c8a40cba28b0b5952b404df6feee8038a9e531062885a852b3f77e9",
      "target": "pg10",
      "selection_status": "selected_exact_log_correlation",
      "limits": "This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger."
    },
    {
      "cases": [
        "dml_unique_conflict"
      ],
      "id": "runtime.23505-diagnostic-snippet-20260909.latest",
      "run_id": "23505-diagnostic-snippet-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "status": "passed",
      "target": "latest",
      "selection_status": "selected_for_dml_diagnostic",
      "limits": "The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data."
    },
    {
      "cases": [
        "dml_unique_conflict"
      ],
      "id": "runtime.23505-diagnostic-snippet-20260909.pg10",
      "run_id": "23505-diagnostic-snippet-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "status": "passed",
      "target": "pg10",
      "selection_status": "selected_for_dml_diagnostic",
      "limits": "The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data."
    },
    {
      "cases": [
        "explicit_tx_abort_recovery"
      ],
      "id": "runtime.23505-explicit-manual-final-20260909.latest",
      "limits": "This run proves that registry transaction statements execute with autocommit=True, so psycopg does not add an implicit BEGIN; it covers this explicit recovery case only.",
      "observed": {
        "connection_autocommit": true,
        "duplicate_sqlstate": "23505",
        "repair_transaction": "BEGIN; INSERT; COMMIT",
        "rows": [
          [
            1,
            "seed"
          ],
          [
            2,
            "after rollback"
          ]
        ],
        "status_after_25p02": "INERROR",
        "status_after_duplicate": "INERROR",
        "status_after_rollback": "IDLE",
        "transaction_control": [
          "BEGIN",
          "ROLLBACK",
          "BEGIN",
          "COMMIT"
        ]
      },
      "raw_sha256": "586bacd10d1e5d2a5a5ec58c2ed747d4b2b8618a051ce56b0d8307c7265e196d",
      "run_id": "23505-explicit-manual-final-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "38cd0161a97fa35084f192a5aa60f6061955b60ec681c4800b575514dee6a6f3",
      "target": "latest",
      "selection_status": "selected_manual_boundary"
    },
    {
      "cases": [
        "explicit_tx_abort_recovery"
      ],
      "id": "runtime.23505-explicit-manual-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "limits": "This run proves that registry transaction statements execute with autocommit=True, so psycopg does not add an implicit BEGIN; it covers this explicit recovery case only.",
      "observed": {
        "connection_autocommit": true,
        "duplicate_sqlstate": "23505",
        "repair_transaction": "BEGIN; INSERT; COMMIT",
        "rows": [
          [
            1,
            "seed"
          ],
          [
            2,
            "after rollback"
          ]
        ],
        "status_after_25p02": "INERROR",
        "status_after_duplicate": "INERROR",
        "status_after_rollback": "IDLE",
        "transaction_control": [
          "BEGIN",
          "ROLLBACK",
          "BEGIN",
          "COMMIT"
        ]
      },
      "raw_sha256": "ed1c4f5082a00b67297a9d01b8362f7d70c758a2fbd393e20def6c450a6f5739",
      "run_id": "23505-explicit-manual-final-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "4a4243d367afd9c142991aba496336c972e4fe3cc959a724d3454773986ac30b",
      "target": "pg10",
      "selection_status": "selected_manual_boundary"
    },
    {
      "cases": [
        "savepoint_recovery"
      ],
      "id": "runtime.23505-savepoint-manual-final-20260909.latest",
      "limits": "This run proves the registry savepoint sequence executes with autocommit=True, so psycopg does not add an implicit BEGIN; it covers savepoint recovery only.",
      "observed": {
        "connection_autocommit": true,
        "statuses": {
          "after_duplicate": "INERROR",
          "after_rollback_to_savepoint": "INTRANS"
        },
        "transaction_control": [
          "BEGIN",
          "SAVEPOINT",
          "ROLLBACK TO SAVEPOINT",
          "RELEASE SAVEPOINT",
          "COMMIT"
        ],
        "rows": [
          [
            1,
            "seed"
          ],
          [
            2,
            "outer"
          ],
          [
            3,
            "after savepoint"
          ]
        ]
      },
      "raw_sha256": "3b3e7305df8d70309f3c632e9b19b43cd9f1411f0967e952bff7997e5c0c7cb7",
      "run_id": "23505-savepoint-manual-final-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "e9ff818a677f577321fb2faccb8d48bb62b054d9f579531a5231029cb16162ef",
      "target": "latest",
      "selection_status": "selected_manual_boundary"
    },
    {
      "cases": [
        "savepoint_recovery"
      ],
      "id": "runtime.23505-savepoint-manual-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "limits": "This run proves the registry savepoint sequence executes with autocommit=True, so psycopg does not add an implicit BEGIN; it covers savepoint recovery only.",
      "observed": {
        "connection_autocommit": true,
        "statuses": {
          "after_duplicate": "INERROR",
          "after_rollback_to_savepoint": "INTRANS"
        },
        "transaction_control": [
          "BEGIN",
          "SAVEPOINT",
          "ROLLBACK TO SAVEPOINT",
          "RELEASE SAVEPOINT",
          "COMMIT"
        ],
        "rows": [
          [
            1,
            "seed"
          ],
          [
            2,
            "outer"
          ],
          [
            3,
            "after savepoint"
          ]
        ]
      },
      "raw_sha256": "74fb5d36973e351dead8e49c02f2e272979c0dae5d40fc6b631a9ea6f25c5742",
      "run_id": "23505-savepoint-manual-final-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "snippet_registry": {
        "sha256": "74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"
      },
      "status": "passed",
      "summary_sha256": "9f6dea66d73191045e35fe239ecff2c69fb046bdd90de5cc4351443f3bc0f4bf",
      "target": "pg10",
      "selection_status": "selected_manual_boundary"
    },
    {
      "id": "runtime.23505-boundary-pg14-20260909.pg14",
      "run_id": "23505-boundary-pg14-20260909",
      "target": "pg14",
      "server_version": "14.24 (Debian 14.24-1.pgdg13+2)",
      "server_version_num": 140024,
      "status": "not_applicable",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "nulls_not_distinct_version_boundary"
      ],
      "summary_sha256": "e757ffaea0ee44d8f5ee5f4187798809d0c63a40020ff575a763e4cabb960f75",
      "raw_sha256": "d21fcb5f18c65a8e941814b8c4046b84700c59ce14b73ced51d2f8ac574552fc",
      "snippet_registry": {
        "sha256": "2535a5a74138b3e7896f1d06e1109be42f62a49b4dac25e3f842d60c30b21a95"
      },
      "case_manifest": {
        "sha256": "e4d9376fa038675dcfd83c3fb3590b2bc43bb897dd5521be11474a7df0334776"
      },
      "observed": {
        "ordinary_unique_null_count": 2,
        "explicit_feature": "unsupported_syntax",
        "unsupported_sqlstate": "42601",
        "unsupported_severity": "ERROR",
        "unsupported_primary": "syntax error at or near \"NULLS\"",
        "status_after_syntax": "IDLE",
        "natural_23505_observed": false
      },
      "selection_status": "selected_boundary_comparison",
      "limits": "The same registry case passed its assertions, but this target cannot execute the explicit feature. Its 42601 result is retained as a version-availability comparison and is not counted as an observed 23505 runtime."
    },
    {
      "id": "runtime.23505-boundary-pg15-20260909.pg15",
      "run_id": "23505-boundary-pg15-20260909",
      "target": "pg15",
      "server_version": "15.19 (Debian 15.19-1.pgdg13+2)",
      "server_version_num": 150019,
      "status": "passed",
      "case_status": "passed",
      "target_status": "passed",
      "cases": [
        "nulls_not_distinct_version_boundary"
      ],
      "summary_sha256": "df4d1f90eaca2155359bc7b141734a1026d7e1893400e5e6352ac1e95461137d",
      "raw_sha256": "d2bd7a499b4c9355f209e0831b3dbba8bcc98c8149010dcc9f13135ae05ed97a",
      "snippet_registry": {
        "sha256": "2535a5a74138b3e7896f1d06e1109be42f62a49b4dac25e3f842d60c30b21a95"
      },
      "case_manifest": {
        "sha256": "e4d9376fa038675dcfd83c3fb3590b2bc43bb897dd5521be11474a7df0334776"
      },
      "observed": {
        "ordinary_unique_null_count": 2,
        "explicit_feature": "supported",
        "explicit_sqlstate": "23505",
        "explicit_severity": "ERROR",
        "explicit_constraint": "nulls_not_distinct_uq",
        "explicit_primary": "duplicate key value violates unique constraint \"nulls_not_distinct_uq\"",
        "explicit_detail": "Key (external_id)=(null) already exists.",
        "status_after_duplicate": "IDLE",
        "repaired_row_count": 2,
        "natural_23505_observed": true
      },
      "selection_status": "selected_boundary_comparison",
      "limits": "This is a separate PG15 boundary comparison for the explicit NULLS NOT DISTINCT case; it does not replace or inflate the selected base runtime cases."
    }
  ]
}
