{"Entry":{"collection":"sqlstate","key":"23505","name":"23505","aliases":[],"metadata":{"aliases":[],"case_count":13,"class_code":"23","condition_name":"unique_violation","condition_names":["unique_violation"],"content_hash":"5bbfc811ad9385a103fe75e9f82825ce0c36c6484e707497b033bea4f73e8149","depth":"full","editorial_review":"reviewed","evidence_tier":"observed_runtime","imported_at":"2026-09-30T17:45:27.204963+08:00","introduced":null,"known_present_by":"7.4","macros":["ERRCODE_UNIQUE_VIOLATION"],"name_zh":"唯一性冲突","present_in":["9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19"],"preview_in":["19"],"primary_macro":"ERRCODE_UNIQUE_VIOLATION","removed":null,"runtime_verification":"passed","severity_classes":["E"],"snippet_count":7,"source_rev":"english-manuals:80d4516037e6dac2ecaca604550622754952d6d2209097d343ab740fddb6091e","sqlstate":"23505","status":"active","summary_zh":"行或索引违反唯一约束，常见于重复键插入。"}},"Definition":{"Collection":"sqlstate","Key":"23505","SourceDatabase":"center","Version":"18","SourceTable":"sqlstate","SourceKey":"23505","SourceRevision":"english-manuals:80d4516037e6dac2ecaca604550622754952d6d2209097d343ab740fddb6091e","Facts":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"23505"},"ManualEvidence":{"doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"sqlstate","Key":"23505","SourceDatabase":"center","Version":"","Locale":"en","Title":"23505 — unique_violation","Summary":"23505 is PostgreSQL's unique_violation condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.","BodyHTML":"\u003ch2\u003eAt a glance {#at-a-glance}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003e23505\u003c/code\u003e is PostgreSQL\u0026#39;s \u003ccode\u003eunique_violation\u003c/code\u003e condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.\u003c/p\u003e\n\u003cp\u003eFirst capture the complete ErrorResponse and the statement that failed. The most useful fields are \u003ccode\u003eC\u003c/code\u003e (SQLSTATE), \u003ccode\u003eM\u003c/code\u003e (primary message), \u003ccode\u003eD\u003c/code\u003e (detail), and, when supplied, \u003ccode\u003es\u003c/code\u003e (schema), \u003ccode\u003et\u003c/code\u003e (table), and \u003ccode\u003en\u003c/code\u003e (constraint or index). In psycopg, these are available through \u003ccode\u003eexc.sqlstate\u003c/code\u003e and \u003ccode\u003eexc.diag\u003c/code\u003e. The object fields belong to the wire protocol; they are not standard column names in CSV logs or keys in JSON logs.\u003c/p\u003e\n\u003cp\u003eThe recovery action depends on where the error occurred:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eAn autocommit statement fails, but that connection is ready for its next command.\u003c/li\u003e\n\u003cli\u003eA statement inside an explicit transaction leaves the transaction aborted. Roll back the transaction, or roll back to a savepoint, before issuing another statement. Otherwise PostgreSQL returns \u003ccode\u003e25P02\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eA deferred unique constraint can accept duplicate rows temporarily and report \u003ccode\u003e23505\u003c/code\u003e at \u003ccode\u003eCOMMIT\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eA PL/pgSQL \u003ccode\u003eEXCEPTION\u003c/code\u003e block can catch the violation in a subtransaction, provided the handler is narrow enough to identify the failing operation.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe selected public runtime records cover 12 distinct passing cases on PostgreSQL 18.6 and 11 passing cases on PostgreSQL 10.21, with \u003ccode\u003eNULLS NOT DISTINCT\u003c/code\u003e marked not applicable on PG10. The full run remains the source for unreplaced cases; targeted final records select the DML diagnostic, exact \u003ccode\u003elog_fields\u003c/code\u003e correlation, registry excerpts, and manual transaction boundaries without duplicating or overriding those cases. A separate PG14.24/PG15.19 boundary comparison records unsupported syntax \u003ccode\u003e42601\u003c/code\u003e on PG14 and natural \u003ccode\u003e23505\u003c/code\u003e on PG15 for explicit \u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e; it is excluded from those base counts. The selected run IDs and structured observations are retained in the \u003ca href=\"#sources\" rel=\"nofollow\"\u003epublic evidence JSON\u003c/a\u003e; superseded summaries and raw JSONL remain local audit data.\u003c/p\u003e\n\u003cp\u003eThe generated locked snapshots above are the catalogue\u0026#39;s release-definition coverage. The executable compatibility targets in this page are PostgreSQL 18.6 and 10.21; the catalogue entry does not claim that 23505 was introduced in PostgreSQL 10.\u003c/p\u003e\n\u003ch2\u003eMeaning and trigger paths {#meaning}\u003c/h2\u003e\n\u003cp\u003eThe SQLSTATE directory places \u003ccode\u003e23505\u003c/code\u003e in Class 23, \u003ccode\u003eintegrity_constraint_violation\u003c/code\u003e, with the condition name \u003ccode\u003eunique_violation\u003c/code\u003e. In the normal btree path, PostgreSQL checks an index entry and raises an error when a conflicting committed or concurrently inserted key is not allowed by the index\u0026#39;s semantics. A primary key is also a unique index, so a duplicate primary-key value uses this condition.\u003c/p\u003e\n\u003cp\u003eThe same SQLSTATE can describe several mechanisms:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003eDML against a unique constraint or index.\u003c/strong\u003e An \u003ccode\u003eINSERT\u003c/code\u003e, or an \u003ccode\u003eUPDATE\u003c/code\u003e that changes a key, can conflict with a row already protected by a unique index. The normal message template is \u003ccode\u003eduplicate key value violates unique constraint \u0026#34;...\u0026#34;\u003c/code\u003e; the optional detail is \u003ccode\u003eKey (...)=(...) already exists.\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eA unique index build.\u003c/strong\u003e Building a unique index over existing duplicate rows uses a different template: \u003ccode\u003ecould not create unique index \u0026#34;...\u0026#34;\u003c/code\u003e, with \u003ccode\u003eKey (...)=(...) is duplicated.\u003c/code\u003e This is an index-build failure, not an ordinary row-insert message.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eA deferred constraint.\u003c/strong\u003e With \u003ccode\u003eDEFERRABLE INITIALLY DEFERRED\u003c/code\u003e, the duplicate can remain in the transaction until the constraint check at commit. The error is therefore associated with \u003ccode\u003eCOMMIT\u003c/code\u003e, and a failed top-level commit rolls back that transaction.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eLogical replication apply.\u003c/strong\u003e PostgreSQL 18 classifies an apply conflict such as \u003ccode\u003einsert_exists\u003c/code\u003e; the conflict reporter still maps the relevant insert/update/multiple-unique paths to \u003ccode\u003e23505\u003c/code\u003e. The message shape and server log context are different from a client-side btree insert. This page has source and documentation evidence for that path, but the current runtime batch did not create a publisher/subscriber topology.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThe code tells you what class of condition occurred. It does not tell you whether the collision is a permanent business duplicate, a race in key selection, or a failed maintenance operation. That distinction comes from the statement, schema, constraint definition, transaction context, and any concurrent activity.\u003c/p\u003e\n\u003cp\u003eThe SQL blocks below are explanatory excerpts with the same operations as the named cases. The authoritative executable source is \u003ccode\u003escripts/verify_cases.py\u003c/code\u003e together with \u003ccode\u003everify/cases/23505/cases.json\u003c/code\u003e; the excerpts identify their case and omit only disposable schema naming and cleanup, so they are not a second runnable case definition.\u003c/p\u003e\n\u003ch2\u003eMessages and diagnostics {#messages}\u003c/h2\u003e\n\u003cp\u003eFor a normal DML conflict, the PostgreSQL 18.6 source path \u003ccode\u003enbtinsert.c\u003c/code\u003e calls \u003ccode\u003eBuildIndexValueDescription\u003c/code\u003e, then reports the unique violation and attaches the table and constraint identity. A representative run record was:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eSQLSTATE: 23505\nseverity: ERROR\nmessage_primary: duplicate key value violates unique constraint \u0026#34;users_email_key\u0026#34;\nmessage_detail: Key (email)=(a@example.test) already exists.\nschema_name: c23505_dml_unique_conflict\ntable_name: users\nconstraint_name: users_email_key\nsource: nbtinsert.c / _bt_check_unique\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThat detail is conditional. PostgreSQL can omit key values when the caller lacks permission to inspect the relevant columns, when row-level security prevents the description, or for an expression index. The same run with an INSERT-only role kept SQLSTATE and object identity but had no \u003ccode\u003emessage_detail\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThe protocol fields are defined in the \u003ca href=\"/docs/18/protocol-error-fields.html\" rel=\"nofollow\"\u003eError and Notice Message Fields\u003c/a\u003e reference. They should be read from the driver exception rather than inferred from a log parser. The 18.6 logging configuration describes CSV fields such as \u003ccode\u003esql_state_code\u003c/code\u003e, \u003ccode\u003emessage\u003c/code\u003e, and \u003ccode\u003edetail\u003c/code\u003e, and JSON fields such as \u003ccode\u003estate_code\u003c/code\u003e, \u003ccode\u003emessage\u003c/code\u003e, and \u003ccode\u003edetail\u003c/code\u003e; neither format defines the protocol\u0026#39;s \u003ccode\u003econstraint_name\u003c/code\u003e as a standard field. The targeted \u003ccode\u003elog_fields\u003c/code\u003e run matched the collector records to the same backend PID, schema/table, constraint, primary message, and DETAIL as the driver diagnostic: PostgreSQL 18.6 exposed both CSV and JSON, while PostgreSQL 10.21 exposed CSV.\u003c/p\u003e\n\u003cp\u003eThe index-build message is deliberately separate:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eSQLSTATE: 23505\nmessage_primary: could not create unique index \u0026#34;idx_concurrent\u0026#34;\nmessage_detail: Key (email)=(dup) is duplicated.\nsource: tuplesortvariants.c / comparetup_index_btree_tiebreak\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eDo not parse only the English message to classify this error. Branch on SQLSTATE, then use the structured fields and the operation context. Localized message text can change while the five-character SQLSTATE remains the stable protocol value.\u003c/p\u003e\n\u003ch2\u003eDiagnosis {#diagnosis}\u003c/h2\u003e\n\u003cp\u003eRecord the failed statement, SQLSTATE, primary message, detail, hint, schema/table/constraint fields, server version, and transaction status. A driver should expose the original exception; a generic ORM error string may discard fields needed to identify the conflicting object.\u003c/p\u003e\n\u003cp\u003eFor a named table, inspect both constraints and indexes before changing data. These are the \u003ccode\u003ediagnostic_catalog_queries\u003c/code\u003e statements used by the runner; the disposable run executes them against its \u003ccode\u003eaccounts\u003c/code\u003e table:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eSELECT conname, contype, condeferrable, condeferred,\n       pg_get_constraintdef(oid)\nFROM pg_constraint\nWHERE conrelid = \u0026#39;accounts\u0026#39;::regclass;\n\nSELECT indexrelid::regclass AS index_name,\n       indisunique, indisvalid, indisready, indislive,\n       pg_get_indexdef(indexrelid)\nFROM pg_index\nWHERE indrelid = \u0026#39;accounts\u0026#39;::regclass;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eFor an ordinary DML error, compare the attempted key with the row protected by the named constraint. Check every unique invariant on the table; a statement that names one conflict target can still violate another unique constraint. For an index-build error, find duplicate keys before retrying the build and inspect \u003ccode\u003epg_index\u003c/code\u003e after a concurrent failure.\u003c/p\u003e\n\u003cp\u003eThe runtime case \u003ccode\u003econcurrent_unique_conflict\u003c/code\u003e used two sessions and an observer. Session A held an uncommitted \u003ccode\u003etoken=\u0026#39;raced\u0026#39;\u003c/code\u003e; before A committed, the observer saw B\u0026#39;s statement with \u003ccode\u003ewait_event_type=Lock\u003c/code\u003e and \u003ccode\u003ewait_event=transactionid\u003c/code\u003e. After A committed, B received \u003ccode\u003e23505\u003c/code\u003e and was \u003ccode\u003eINERROR\u003c/code\u003e until rollback. This synchronization is evidence of the ordering; a fixed sleep would not establish it.\u003c/p\u003e\n\u003ch2\u003eResponse and repair {#response}\u003c/h2\u003e\n\u003ch3\u003eRecover the transaction first (cases: \u003ccode\u003eexplicit_tx_abort_recovery\u003c/code\u003e, \u003ccode\u003esavepoint_recovery\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eWith autocommit enabled, the failed operation is complete and the connection was \u003ccode\u003eIDLE\u003c/code\u003e in the runtime cases. Decide what the application should do with the input, then issue a new command.\u003c/p\u003e\n\u003cp\u003eInside an explicit transaction, stop using the connection after the first failure until the failed transaction is handled:\u003c/p\u003e\n\u003cp\u003eThe \u003ccode\u003eINSERT INTO items VALUES (3, \u0026#39;seed\u0026#39;)\u003c/code\u003e statement below is the natural duplicate trigger; the following \u003ccode\u003eROLLBACK\u003c/code\u003e is the required recovery.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, \u0026#39;seed\u0026#39;);\nBEGIN;\nINSERT INTO items VALUES (2, \u0026#39;outer\u0026#39;);\nINSERT INTO items VALUES (3, \u0026#39;seed\u0026#39;);\nROLLBACK;\nBEGIN;\nINSERT INTO items VALUES (2, \u0026#39;after rollback\u0026#39;);\nCOMMIT;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIf only a part of the unit of work is optional, use a savepoint and retain the outer work:\u003c/p\u003e\n\u003cp\u003eThe insert after the savepoint reuses the seeded unique value, so it is the natural \u003ccode\u003e23505\u003c/code\u003e trigger. \u003ccode\u003eROLLBACK TO SAVEPOINT\u003c/code\u003e then removes only that failed subtransaction.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, \u0026#39;seed\u0026#39;);\nBEGIN;\nINSERT INTO items VALUES (2, \u0026#39;outer\u0026#39;);\nSAVEPOINT unique_case;\nINSERT INTO items VALUES (3, \u0026#39;seed\u0026#39;);\n-- This statement is expected to return 25P02 while the transaction is failed.\nSELECT count(*) FROM items;\nROLLBACK TO SAVEPOINT unique_case;\nINSERT INTO items VALUES (3, \u0026#39;after savepoint\u0026#39;);\nRELEASE SAVEPOINT unique_case;\nCOMMIT;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe runner observed \u003ccode\u003e25P02\u003c/code\u003e when it issued a \u003ccode\u003eSELECT\u003c/code\u003e before rollback, then observed \u003ccode\u003eINTRANS\u003c/code\u003e after \u003ccode\u003eROLLBACK TO SAVEPOINT\u003c/code\u003e. A plain \u003ccode\u003eROLLBACK\u003c/code\u003e returns an explicit transaction to \u003ccode\u003eIDLE\u003c/code\u003e; \u003ccode\u003eROLLBACK TO\u003c/code\u003e preserves work before the savepoint.\u003c/p\u003e\n\u003cp\u003eA deferred constraint changes the failure point (case: \u003ccode\u003edeferred_commit_conflict\u003c/code\u003e). In the real case, both duplicate inserts succeeded while the connection was \u003ccode\u003eINTRANS\u003c/code\u003e; \u003ccode\u003eCOMMIT\u003c/code\u003e then raised \u003ccode\u003e23505\u003c/code\u003e, returned the connection to \u003ccode\u003eIDLE\u003c/code\u003e, and left zero rows from that failed top-level transaction. Fix the keys before commit or roll back and retry the entire unit of work.\u003c/p\u003e\n\u003cp\u003ePL/pgSQL can handle a natural unique violation inside an exception block (case: \u003ccode\u003eplpgsql_exception_recovery\u003c/code\u003e):\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id, note) VALUES (1, \u0026#39;seed\u0026#39;);\n\nCREATE FUNCTION try_insert(wanted integer) RETURNS text\nLANGUAGE plpgsql AS $$\nDECLARE returned_state text;\nBEGIN\n    INSERT INTO items(id, note) VALUES (wanted, \u0026#39;body\u0026#39;);\n    RETURN \u0026#39;inserted\u0026#39;;\nEXCEPTION WHEN unique_violation THEN\n    GET STACKED DIAGNOSTICS returned_state = RETURNED_SQLSTATE;\n    INSERT INTO items(id, note) VALUES (wanted + 1, \u0026#39;handler\u0026#39;);\n    RETURN returned_state;\nEND\n$$;\n\nSELECT try_insert(1);\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe protected block is executed with subtransaction behavior. If an error occurs, persistent changes made inside that block are rolled back before the handler runs; changes made before entering the block remain. Keep the handler narrow: if the block contains several statements that can violate different unique constraints, a caught \u003ccode\u003eunique_violation\u003c/code\u003e does not by itself prove which operation caused it. PostgreSQL\u0026#39;s own PL/pgSQL documentation warns about this shape in generic upsert handlers.\u003c/p\u003e\n\u003ch3\u003eChoose the business operation (case: \u003ccode\u003eon_conflict_target_scope\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003e\u003ccode\u003eON CONFLICT\u003c/code\u003e is a tool for an intentional conflict policy, not a general instruction to hide duplicates. A conflict target chooses the arbiter. In the runtime case, an existing row occupied \u003ccode\u003ephone=\u0026#39;phone-1\u0026#39;\u003c/code\u003e:\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eCREATE TABLE accounts(\n    id integer PRIMARY KEY,\n    email text NOT NULL,\n    phone text NOT NULL,\n    CONSTRAINT accounts_email_uq UNIQUE (email),\n    CONSTRAINT accounts_phone_uq UNIQUE (phone)\n);\nINSERT INTO accounts VALUES (1, \u0026#39;existing@example.test\u0026#39;, \u0026#39;phone-1\u0026#39;);\n\nINSERT INTO accounts(id,email,phone)\nVALUES (2, \u0026#39;existing@example.test\u0026#39;, \u0026#39;phone-2\u0026#39;)\nON CONFLICT (email) DO NOTHING;\n\n-- Handles an email conflict only. A phone-only conflict still raises 23505.\nINSERT INTO accounts(id,email,phone)\nVALUES (3, \u0026#39;new@example.test\u0026#39;, \u0026#39;phone-1\u0026#39;)\nON CONFLICT (email) DO NOTHING;\n\n-- With no target, DO NOTHING covers a conflict with any usable arbiter.\nINSERT INTO accounts(id,email,phone)\nVALUES (4, \u0026#39;third@example.test\u0026#39;, \u0026#39;phone-1\u0026#39;)\nON CONFLICT DO NOTHING;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eFor \u003ccode\u003eDO UPDATE\u003c/code\u003e, make the update deterministic and check its business result. For an idempotency key, compare the incoming request\u0026#39;s relevant identity and parameters with the stored request, then verify the existing business result before returning “already processed.” A key collision alone is not proof that the earlier request was equivalent.\u003c/p\u003e\n\u003ch3\u003eRepair sequences carefully (case: \u003ccode\u003esequence_lag_repair\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eA manually supplied key can leave a sequence behind the table. The controlled runtime case used a non-default sequence:\u003c/p\u003e\n\u003cp\u003eThe second \u003ccode\u003enextval\u003c/code\u003e insert below is the natural duplicate trigger. The \u003ccode\u003esetval\u003c/code\u003e call is followed by a real insert that verifies the repaired next value.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eCREATE SEQUENCE ids_seq START WITH 100 INCREMENT BY 7 MINVALUE 100 MAXVALUE 100000;\nCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id,note) VALUES (100, \u0026#39;explicit\u0026#39;);\nINSERT INTO items(id,note) VALUES (nextval(\u0026#39;ids_seq\u0026#39;), \u0026#39;generated\u0026#39;);\nSELECT setval(\u0026#39;ids_seq\u0026#39;, (SELECT max(id) FROM items), true);\nINSERT INTO items(id,note) VALUES (nextval(\u0026#39;ids_seq\u0026#39;), \u0026#39;after repair\u0026#39;);\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAfter the controlled \u003ccode\u003esetval\u003c/code\u003e, the next value was 107. This is a repair pattern with explicit preconditions: quiesce writers, confirm the sequence identity and ownership, handle an empty table without passing an invalid value, and inspect increment, bounds, cache, and \u003ccode\u003eis_called\u003c/code\u003e. \u003ccode\u003esetval\u003c/code\u003e is not a universal concurrent repair; sequence changes are not rolled back like ordinary table writes.\u003c/p\u003e\n\u003ch3\u003eRetry only when the operation is retryable\u003c/h3\u003e\n\u003cp\u003eThe \u003ca href=\"/docs/18/mvcc-serialization-failure-handling.html\" rel=\"nofollow\"\u003eserialization failure guidance\u003c/a\u003e documents a class of cases where concurrent key selection can surface as \u003ccode\u003e23505\u003c/code\u003e. When the application has established that meaning, retry the complete transaction, including the key-selection logic, and apply a bounded backoff and an idempotency policy. Do not retry blindly: a duplicate requested by the user can be permanent, and repeated retries can produce the same conflict.\u003c/p\u003e\n\u003cp\u003eFor the two-session case, the conflict happened after a lock-established ordering. The runner does not claim that every application operation with the same code is safe to retry.\u003c/p\u003e\n\u003ch3\u003eHandle failed concurrent index builds (case: \u003ccode\u003eindex_build_conflict\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eThe \u003ca href=\"/docs/18/sql-createindex.html\" rel=\"nofollow\"\u003eCREATE INDEX documentation\u003c/a\u003e explains that a concurrent build can leave an \u003ccode\u003eINVALID\u003c/code\u003e index when a scan problem such as a uniqueness failure occurs. In this duplicate-scan case, \u003ccode\u003epg_index\u003c/code\u003e showed \u003ccode\u003eindisvalid=false\u003c/code\u003e, \u003ccode\u003eindisready=false\u003c/code\u003e, \u003ccode\u003eindislive=true\u003c/code\u003e, and \u003ccode\u003eindisunique=true\u003c/code\u003e; the regular transactional build left no index after rollback. Resolve duplicates, inspect the actual catalog state, drop a leftover invalid index when appropriate, and retry. Do not generalize this state to every possible \u003ccode\u003eCREATE INDEX CONCURRENTLY\u003c/code\u003e failure stage.\u003c/p\u003e\n\u003ch2\u003eVersions and boundaries {#versions}\u003c/h2\u003e\n\u003cp\u003eThe same SQLSTATE was observed in both PostgreSQL 10.21 and 18.6. Source line numbers and internal function names differ between those releases; use the SQLSTATE and the operation context rather than a source line as the compatibility contract.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e is available in PostgreSQL 15 and later and must be selected explicitly. The runtime case inserted two NULLs into a default unique column successfully, while a separately declared \u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e constraint raised \u003ccode\u003e23505\u003c/code\u003e on the second NULL. An upgrade does not silently change the old default to NULLS NOT DISTINCT.\u003c/p\u003e\n\u003cp\u003eThe separate boundary comparison records the executed availability and behavior: PostgreSQL 14.24 accepted two ordinary \u003ccode\u003eNULL\u003c/code\u003e rows but rejected the explicit declaration with \u003ccode\u003e42601\u003c/code\u003e and no \u003ccode\u003e23505\u003c/code\u003e; PostgreSQL 15.19 raised \u003ccode\u003e23505\u003c/code\u003e on the second explicit \u003ccode\u003eNULL\u003c/code\u003e, left the autocommit session \u003ccode\u003eIDLE\u003c/code\u003e, and committed the valid repair. These records are retained separately and do not inflate the base selected case counts. On another disposable target, check the version before executing the branch: run \u003ccode\u003eordinary_create\u003c/code\u003e, \u003ccode\u003eordinary_first\u003c/code\u003e, \u003ccode\u003eordinary_second\u003c/code\u003e, and \u003ccode\u003eordinary_verify\u003c/code\u003e; then run \u003ccode\u003eexplicit_create\u003c/code\u003e. If \u003ccode\u003eexplicit_create\u003c/code\u003e returns the expected PG14 \u003ccode\u003e42601\u003c/code\u003e, stop that boundary case and do not send \u003ccode\u003eexplicit_first\u003c/code\u003e, \u003ccode\u003eexplicit_second\u003c/code\u003e, \u003ccode\u003eexplicit_repair\u003c/code\u003e, or \u003ccode\u003eexplicit_verify\u003c/code\u003e. Only when \u003ccode\u003eexplicit_create\u003c/code\u003e succeeds on PG15 or later should you continue with the explicit inserts, observe the second-NULL result, and then run the repair and verification steps.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e-- ordinary_create\nCREATE TABLE ordinary_nulls (external_id integer UNIQUE);\n-- ordinary_first\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_second\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_verify\nSELECT count(*) FROM ordinary_nulls;\n-- explicit_create\nCREATE TABLE explicit_nulls (external_id integer, CONSTRAINT nulls_not_distinct_uq UNIQUE NULLS NOT DISTINCT (external_id));\n-- explicit_first\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_second\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_repair\nINSERT INTO explicit_nulls VALUES (1);\n-- explicit_verify\nSELECT count(*) FROM explicit_nulls;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ePostgreSQL 18\u0026#39;s logical conflict reporter uses labels such as \u003ccode\u003einsert_exists\u003c/code\u003e in its apply context. That message change does not turn the relevant unique conflict into a different SQLSTATE. The current evidence is source and documentation based; the runtime report does not claim a replication topology was tested.\u003c/p\u003e\n\u003cp\u003eThe locked catalogue has a definition-presence observation for \u003ccode\u003e23505\u003c/code\u003e at PostgreSQL 7.4 and through the 8.4.22 pre-9.0 definitions, then in every listed formal snapshot through PostgreSQL 18.6 and the PostgreSQL 19 Beta 3 preview. This is a definition-only presence boundary, not an exact implementation introduction or runtime-use claim.\u003c/p\u003e\n\u003ch2\u003eRelated codes {#related}\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/25P02/\" rel=\"nofollow\"\u003e\u003ccode\u003e25P02\u003c/code\u003e — in_failed_sql_transaction\u003c/a\u003e explains the follow-on error after an unhandled statement failure in an explicit transaction.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/40001/\" rel=\"nofollow\"\u003e\u003ccode\u003e40001\u003c/code\u003e — serialization_failure\u003c/a\u003e and \u003ca href=\"/wiki/sqlstate/40P01/\" rel=\"nofollow\"\u003e\u003ccode\u003e40P01\u003c/code\u003e — deadlock_detected\u003c/a\u003e are the primary retry-related transaction errors; PostgreSQL also documents selected \u003ccode\u003e23505\u003c/code\u003e key-selection races.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/23503/\" rel=\"nofollow\"\u003e\u003ccode\u003e23503\u003c/code\u003e — foreign_key_violation\u003c/a\u003e is another Class 23 integrity error, but a missing referenced row has different diagnosis and repair steps.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eSources and evidence {#sources}\u003c/h2\u003e\n\u003cp\u003eEvidence IDs used by this page are \u003ccode\u003eidentity.class-and-condition\u003c/code\u003e, \u003ccode\u003eruntime.dml-template\u003c/code\u003e, \u003ccode\u003eruntime.protocol-fields\u003c/code\u003e, \u003ccode\u003eruntime.index-build-template\u003c/code\u003e, \u003ccode\u003eruntime.logical-apply-sqlstate\u003c/code\u003e, \u003ccode\u003eruntime.tx-contexts\u003c/code\u003e, \u003ccode\u003eruntime.retry-boundary\u003c/code\u003e, \u003ccode\u003eruntime.on-conflict-scope\u003c/code\u003e, \u003ccode\u003eruntime.sequence-repair-limit\u003c/code\u003e, \u003ccode\u003eruntime.nulls-choice\u003c/code\u003e, \u003ccode\u003eruntime.detail-visibility\u003c/code\u003e, and \u003ccode\u003eruntime.version-boundary\u003c/code\u003e in the \u003ca href=\"#sources\" rel=\"nofollow\"\u003epublic evidence JSON\u003c/a\u003e. The selected runtime records use the base run for unreplaced cases, \u003ccode\u003e23505-diagnostic-snippet-20260909\u003c/code\u003e for DML, \u003ccode\u003e23505-log-fields-final-20260909\u003c/code\u003e for exact collector correlation, \u003ccode\u003e23505-snippet-contract-20260909\u003c/code\u003e for the registry excerpts, and the manual-boundary runs for explicit transaction and savepoint recovery. The separate boundary records are \u003ccode\u003eruntime.23505-boundary-pg14-20260909.pg14\u003c/code\u003e and \u003ccode\u003eruntime.23505-boundary-pg15-20260909.pg15\u003c/code\u003e; they are a version comparison, not additions to the base case count. Superseded full-run selections remain local audit data.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L235-L241\" rel=\"nofollow\"\u003ePostgreSQL 18.6 \u003ccode\u003eerrcodes.txt\u003c/code\u003e at the fixed source commit\u003c/a\u003e — Class 23 and \u003ccode\u003eunique_violation\u003c/code\u003e identity.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L640-L674\" rel=\"nofollow\"\u003ePostgreSQL 18.6 nbtree unique check at the fixed source commit\u003c/a\u003e — DML message and protocol object attachment.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/genam.c#L155-L275\" rel=\"nofollow\"\u003ePostgreSQL 18.6 index value description at the fixed source commit\u003c/a\u003e — detail visibility limits.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/sort/tuplesortvariants.c#L1670-L1694\" rel=\"nofollow\"\u003ePostgreSQL 18.6 index-build error at the fixed source commit\u003c/a\u003e — separate build template.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/conflict.c#L102-L180\" rel=\"nofollow\"\u003ePostgreSQL 18.6 logical conflict reporter at the fixed source commit\u003c/a\u003e — apply labels and SQLSTATE mapping.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/sql-insert.html\" rel=\"nofollow\"\u003eINSERT command reference\u003c/a\u003e — conflict-target scope and arbiter restrictions.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/sql-createindex.html\" rel=\"nofollow\"\u003eCREATE INDEX command reference\u003c/a\u003e — concurrent-build phases and invalid-index behavior.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/protocol-error-fields.html\" rel=\"nofollow\"\u003eError and Notice Message Fields\u003c/a\u003e and \u003ca href=\"/docs/18/runtime-config-logging.html\" rel=\"nofollow\"\u003eserver log configuration\u003c/a\u003e — protocol versus collector fields.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/plpgsql-control-structures.html\" rel=\"nofollow\"\u003ePL/pgSQL control structures\u003c/a\u003e, \u003ca href=\"/docs/18/tutorial-transactions.html\" rel=\"nofollow\"\u003etransaction tutorial\u003c/a\u003e, and \u003ca href=\"/docs/18/functions-sequence.html\" rel=\"nofollow\"\u003esequence functions\u003c/a\u003e — recovery and controlled repair semantics.\u003c/li\u003e\n\u003c/ul\u003e\n","SourceRevision":"english-manuals:80d4516037e6dac2ecaca604550622754952d6d2209097d343ab740fddb6091e","ContentHash":"231b72f42aaecb00ee6f409de14cc072fd4d575901f7b463bc9c7885aa3d9823","Payload":{"body_md":"\n## At a glance {#at-a-glance}\n\n`23505` is PostgreSQL's `unique_violation` condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.\n\nFirst capture the complete ErrorResponse and the statement that failed. The most useful fields are `C` (SQLSTATE), `M` (primary message), `D` (detail), and, when supplied, `s` (schema), `t` (table), and `n` (constraint or index). In psycopg, these are available through `exc.sqlstate` and `exc.diag`. The object fields belong to the wire protocol; they are not standard column names in CSV logs or keys in JSON logs.\n\nThe recovery action depends on where the error occurred:\n\n- An autocommit statement fails, but that connection is ready for its next command.\n- A statement inside an explicit transaction leaves the transaction aborted. Roll back the transaction, or roll back to a savepoint, before issuing another statement. Otherwise PostgreSQL returns `25P02`.\n- A deferred unique constraint can accept duplicate rows temporarily and report `23505` at `COMMIT`.\n- A PL/pgSQL `EXCEPTION` block can catch the violation in a subtransaction, provided the handler is narrow enough to identify the failing operation.\n\nThe selected public runtime records cover 12 distinct passing cases on PostgreSQL 18.6 and 11 passing cases on PostgreSQL 10.21, with `NULLS NOT DISTINCT` marked not applicable on PG10. The full run remains the source for unreplaced cases; targeted final records select the DML diagnostic, exact `log_fields` correlation, registry excerpts, and manual transaction boundaries without duplicating or overriding those cases. A separate PG14.24/PG15.19 boundary comparison records unsupported syntax `42601` on PG14 and natural `23505` on PG15 for explicit `UNIQUE NULLS NOT DISTINCT`; it is excluded from those base counts. The selected run IDs and structured observations are retained in the [public evidence JSON](#sources); superseded summaries and raw JSONL remain local audit data.\n\n\nThe generated locked snapshots above are the catalogue's release-definition coverage. The executable compatibility targets in this page are PostgreSQL 18.6 and 10.21; the catalogue entry does not claim that 23505 was introduced in PostgreSQL 10.\n\n## Meaning and trigger paths {#meaning}\n\nThe SQLSTATE directory places `23505` in Class 23, `integrity_constraint_violation`, with the condition name `unique_violation`. In the normal btree path, PostgreSQL checks an index entry and raises an error when a conflicting committed or concurrently inserted key is not allowed by the index's semantics. A primary key is also a unique index, so a duplicate primary-key value uses this condition.\n\nThe same SQLSTATE can describe several mechanisms:\n\n1. **DML against a unique constraint or index.** An `INSERT`, or an `UPDATE` that changes a key, can conflict with a row already protected by a unique index. The normal message template is `duplicate key value violates unique constraint \"...\"`; the optional detail is `Key (...)=(...) already exists.`\n2. **A unique index build.** Building a unique index over existing duplicate rows uses a different template: `could not create unique index \"...\"`, with `Key (...)=(...) is duplicated.` This is an index-build failure, not an ordinary row-insert message.\n3. **A deferred constraint.** With `DEFERRABLE INITIALLY DEFERRED`, the duplicate can remain in the transaction until the constraint check at commit. The error is therefore associated with `COMMIT`, and a failed top-level commit rolls back that transaction.\n4. **Logical replication apply.** PostgreSQL 18 classifies an apply conflict such as `insert_exists`; the conflict reporter still maps the relevant insert/update/multiple-unique paths to `23505`. The message shape and server log context are different from a client-side btree insert. This page has source and documentation evidence for that path, but the current runtime batch did not create a publisher/subscriber topology.\n\nThe code tells you what class of condition occurred. It does not tell you whether the collision is a permanent business duplicate, a race in key selection, or a failed maintenance operation. That distinction comes from the statement, schema, constraint definition, transaction context, and any concurrent activity.\n\nThe SQL blocks below are explanatory excerpts with the same operations as the named cases. The authoritative executable source is `scripts/verify_cases.py` together with `verify/cases/23505/cases.json`; the excerpts identify their case and omit only disposable schema naming and cleanup, so they are not a second runnable case definition.\n\n## Messages and diagnostics {#messages}\n\nFor a normal DML conflict, the PostgreSQL 18.6 source path `nbtinsert.c` calls `BuildIndexValueDescription`, then reports the unique violation and attaches the table and constraint identity. A representative run record was:\n\n```text\nSQLSTATE: 23505\nseverity: ERROR\nmessage_primary: duplicate key value violates unique constraint \"users_email_key\"\nmessage_detail: Key (email)=(a@example.test) already exists.\nschema_name: c23505_dml_unique_conflict\ntable_name: users\nconstraint_name: users_email_key\nsource: nbtinsert.c / _bt_check_unique\n```\n\nThat detail is conditional. PostgreSQL can omit key values when the caller lacks permission to inspect the relevant columns, when row-level security prevents the description, or for an expression index. The same run with an INSERT-only role kept SQLSTATE and object identity but had no `message_detail`.\n\nThe protocol fields are defined in the [Error and Notice Message Fields](/docs/18/protocol-error-fields.html) reference. They should be read from the driver exception rather than inferred from a log parser. The 18.6 logging configuration describes CSV fields such as `sql_state_code`, `message`, and `detail`, and JSON fields such as `state_code`, `message`, and `detail`; neither format defines the protocol's `constraint_name` as a standard field. The targeted `log_fields` run matched the collector records to the same backend PID, schema/table, constraint, primary message, and DETAIL as the driver diagnostic: PostgreSQL 18.6 exposed both CSV and JSON, while PostgreSQL 10.21 exposed CSV.\n\nThe index-build message is deliberately separate:\n\n```text\nSQLSTATE: 23505\nmessage_primary: could not create unique index \"idx_concurrent\"\nmessage_detail: Key (email)=(dup) is duplicated.\nsource: tuplesortvariants.c / comparetup_index_btree_tiebreak\n```\n\nDo not parse only the English message to classify this error. Branch on SQLSTATE, then use the structured fields and the operation context. Localized message text can change while the five-character SQLSTATE remains the stable protocol value.\n\n## Diagnosis {#diagnosis}\n\nRecord the failed statement, SQLSTATE, primary message, detail, hint, schema/table/constraint fields, server version, and transaction status. A driver should expose the original exception; a generic ORM error string may discard fields needed to identify the conflicting object.\n\nFor a named table, inspect both constraints and indexes before changing data. These are the `diagnostic_catalog_queries` statements used by the runner; the disposable run executes them against its `accounts` table:\n\n```sql\nSELECT conname, contype, condeferrable, condeferred,\n       pg_get_constraintdef(oid)\nFROM pg_constraint\nWHERE conrelid = 'accounts'::regclass;\n\nSELECT indexrelid::regclass AS index_name,\n       indisunique, indisvalid, indisready, indislive,\n       pg_get_indexdef(indexrelid)\nFROM pg_index\nWHERE indrelid = 'accounts'::regclass;\n```\n\nFor an ordinary DML error, compare the attempted key with the row protected by the named constraint. Check every unique invariant on the table; a statement that names one conflict target can still violate another unique constraint. For an index-build error, find duplicate keys before retrying the build and inspect `pg_index` after a concurrent failure.\n\nThe runtime case `concurrent_unique_conflict` used two sessions and an observer. Session A held an uncommitted `token='raced'`; before A committed, the observer saw B's statement with `wait_event_type=Lock` and `wait_event=transactionid`. After A committed, B received `23505` and was `INERROR` until rollback. This synchronization is evidence of the ordering; a fixed sleep would not establish it.\n\n## Response and repair {#response}\n\n### Recover the transaction first (cases: `explicit_tx_abort_recovery`, `savepoint_recovery`)\n\nWith autocommit enabled, the failed operation is complete and the connection was `IDLE` in the runtime cases. Decide what the application should do with the input, then issue a new command.\n\nInside an explicit transaction, stop using the connection after the first failure until the failed transaction is handled:\n\nThe `INSERT INTO items VALUES (3, 'seed')` statement below is the natural duplicate trigger; the following `ROLLBACK` is the required recovery.\n\n```sql\nCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, 'seed');\nBEGIN;\nINSERT INTO items VALUES (2, 'outer');\nINSERT INTO items VALUES (3, 'seed');\nROLLBACK;\nBEGIN;\nINSERT INTO items VALUES (2, 'after rollback');\nCOMMIT;\n```\n\nIf only a part of the unit of work is optional, use a savepoint and retain the outer work:\n\nThe insert after the savepoint reuses the seeded unique value, so it is the natural `23505` trigger. `ROLLBACK TO SAVEPOINT` then removes only that failed subtransaction.\n\n```sql\nCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, 'seed');\nBEGIN;\nINSERT INTO items VALUES (2, 'outer');\nSAVEPOINT unique_case;\nINSERT INTO items VALUES (3, 'seed');\n-- This statement is expected to return 25P02 while the transaction is failed.\nSELECT count(*) FROM items;\nROLLBACK TO SAVEPOINT unique_case;\nINSERT INTO items VALUES (3, 'after savepoint');\nRELEASE SAVEPOINT unique_case;\nCOMMIT;\n```\n\nThe runner observed `25P02` when it issued a `SELECT` before rollback, then observed `INTRANS` after `ROLLBACK TO SAVEPOINT`. A plain `ROLLBACK` returns an explicit transaction to `IDLE`; `ROLLBACK TO` preserves work before the savepoint.\n\nA deferred constraint changes the failure point (case: `deferred_commit_conflict`). In the real case, both duplicate inserts succeeded while the connection was `INTRANS`; `COMMIT` then raised `23505`, returned the connection to `IDLE`, and left zero rows from that failed top-level transaction. Fix the keys before commit or roll back and retry the entire unit of work.\n\nPL/pgSQL can handle a natural unique violation inside an exception block (case: `plpgsql_exception_recovery`):\n\n```sql\nCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id, note) VALUES (1, 'seed');\n\nCREATE FUNCTION try_insert(wanted integer) RETURNS text\nLANGUAGE plpgsql AS $$\nDECLARE returned_state text;\nBEGIN\n    INSERT INTO items(id, note) VALUES (wanted, 'body');\n    RETURN 'inserted';\nEXCEPTION WHEN unique_violation THEN\n    GET STACKED DIAGNOSTICS returned_state = RETURNED_SQLSTATE;\n    INSERT INTO items(id, note) VALUES (wanted + 1, 'handler');\n    RETURN returned_state;\nEND\n$$;\n\nSELECT try_insert(1);\n```\n\nThe protected block is executed with subtransaction behavior. If an error occurs, persistent changes made inside that block are rolled back before the handler runs; changes made before entering the block remain. Keep the handler narrow: if the block contains several statements that can violate different unique constraints, a caught `unique_violation` does not by itself prove which operation caused it. PostgreSQL's own PL/pgSQL documentation warns about this shape in generic upsert handlers.\n\n### Choose the business operation (case: `on_conflict_target_scope`)\n\n`ON CONFLICT` is a tool for an intentional conflict policy, not a general instruction to hide duplicates. A conflict target chooses the arbiter. In the runtime case, an existing row occupied `phone='phone-1'`:\n\n```sql\nCREATE TABLE accounts(\n    id integer PRIMARY KEY,\n    email text NOT NULL,\n    phone text NOT NULL,\n    CONSTRAINT accounts_email_uq UNIQUE (email),\n    CONSTRAINT accounts_phone_uq UNIQUE (phone)\n);\nINSERT INTO accounts VALUES (1, 'existing@example.test', 'phone-1');\n\nINSERT INTO accounts(id,email,phone)\nVALUES (2, 'existing@example.test', 'phone-2')\nON CONFLICT (email) DO NOTHING;\n\n-- Handles an email conflict only. A phone-only conflict still raises 23505.\nINSERT INTO accounts(id,email,phone)\nVALUES (3, 'new@example.test', 'phone-1')\nON CONFLICT (email) DO NOTHING;\n\n-- With no target, DO NOTHING covers a conflict with any usable arbiter.\nINSERT INTO accounts(id,email,phone)\nVALUES (4, 'third@example.test', 'phone-1')\nON CONFLICT DO NOTHING;\n```\n\nFor `DO UPDATE`, make the update deterministic and check its business result. For an idempotency key, compare the incoming request's relevant identity and parameters with the stored request, then verify the existing business result before returning “already processed.” A key collision alone is not proof that the earlier request was equivalent.\n\n### Repair sequences carefully (case: `sequence_lag_repair`)\n\nA manually supplied key can leave a sequence behind the table. The controlled runtime case used a non-default sequence:\n\nThe second `nextval` insert below is the natural duplicate trigger. The `setval` call is followed by a real insert that verifies the repaired next value.\n\n```sql\nCREATE SEQUENCE ids_seq START WITH 100 INCREMENT BY 7 MINVALUE 100 MAXVALUE 100000;\nCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id,note) VALUES (100, 'explicit');\nINSERT INTO items(id,note) VALUES (nextval('ids_seq'), 'generated');\nSELECT setval('ids_seq', (SELECT max(id) FROM items), true);\nINSERT INTO items(id,note) VALUES (nextval('ids_seq'), 'after repair');\n```\n\nAfter the controlled `setval`, the next value was 107. This is a repair pattern with explicit preconditions: quiesce writers, confirm the sequence identity and ownership, handle an empty table without passing an invalid value, and inspect increment, bounds, cache, and `is_called`. `setval` is not a universal concurrent repair; sequence changes are not rolled back like ordinary table writes.\n\n### Retry only when the operation is retryable\n\nThe [serialization failure guidance](/docs/18/mvcc-serialization-failure-handling.html) documents a class of cases where concurrent key selection can surface as `23505`. When the application has established that meaning, retry the complete transaction, including the key-selection logic, and apply a bounded backoff and an idempotency policy. Do not retry blindly: a duplicate requested by the user can be permanent, and repeated retries can produce the same conflict.\n\nFor the two-session case, the conflict happened after a lock-established ordering. The runner does not claim that every application operation with the same code is safe to retry.\n\n### Handle failed concurrent index builds (case: `index_build_conflict`)\n\nThe [CREATE INDEX documentation](/docs/18/sql-createindex.html) explains that a concurrent build can leave an `INVALID` index when a scan problem such as a uniqueness failure occurs. In this duplicate-scan case, `pg_index` showed `indisvalid=false`, `indisready=false`, `indislive=true`, and `indisunique=true`; the regular transactional build left no index after rollback. Resolve duplicates, inspect the actual catalog state, drop a leftover invalid index when appropriate, and retry. Do not generalize this state to every possible `CREATE INDEX CONCURRENTLY` failure stage.\n\n## Versions and boundaries {#versions}\n\nThe same SQLSTATE was observed in both PostgreSQL 10.21 and 18.6. Source line numbers and internal function names differ between those releases; use the SQLSTATE and the operation context rather than a source line as the compatibility contract.\n\n`UNIQUE NULLS NOT DISTINCT` is available in PostgreSQL 15 and later and must be selected explicitly. The runtime case inserted two NULLs into a default unique column successfully, while a separately declared `UNIQUE NULLS NOT DISTINCT` constraint raised `23505` on the second NULL. An upgrade does not silently change the old default to NULLS NOT DISTINCT.\n\nThe separate boundary comparison records the executed availability and behavior: PostgreSQL 14.24 accepted two ordinary `NULL` rows but rejected the explicit declaration with `42601` and no `23505`; PostgreSQL 15.19 raised `23505` on the second explicit `NULL`, left the autocommit session `IDLE`, and committed the valid repair. These records are retained separately and do not inflate the base selected case counts. On another disposable target, check the version before executing the branch: run `ordinary_create`, `ordinary_first`, `ordinary_second`, and `ordinary_verify`; then run `explicit_create`. If `explicit_create` returns the expected PG14 `42601`, stop that boundary case and do not send `explicit_first`, `explicit_second`, `explicit_repair`, or `explicit_verify`. Only when `explicit_create` succeeds on PG15 or later should you continue with the explicit inserts, observe the second-NULL result, and then run the repair and verification steps.\n\n```sql\n-- ordinary_create\nCREATE TABLE ordinary_nulls (external_id integer UNIQUE);\n-- ordinary_first\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_second\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_verify\nSELECT count(*) FROM ordinary_nulls;\n-- explicit_create\nCREATE TABLE explicit_nulls (external_id integer, CONSTRAINT nulls_not_distinct_uq UNIQUE NULLS NOT DISTINCT (external_id));\n-- explicit_first\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_second\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_repair\nINSERT INTO explicit_nulls VALUES (1);\n-- explicit_verify\nSELECT count(*) FROM explicit_nulls;\n```\n\nPostgreSQL 18's logical conflict reporter uses labels such as `insert_exists` in its apply context. That message change does not turn the relevant unique conflict into a different SQLSTATE. The current evidence is source and documentation based; the runtime report does not claim a replication topology was tested.\n\nThe locked catalogue has a definition-presence observation for `23505` at PostgreSQL 7.4 and through the 8.4.22 pre-9.0 definitions, then in every listed formal snapshot through PostgreSQL 18.6 and the PostgreSQL 19 Beta 3 preview. This is a definition-only presence boundary, not an exact implementation introduction or runtime-use claim.\n\n## Related codes {#related}\n\n- [`25P02` — in_failed_sql_transaction](/wiki/sqlstate/25P02/) explains the follow-on error after an unhandled statement failure in an explicit transaction.\n- [`40001` — serialization_failure](/wiki/sqlstate/40001/) and [`40P01` — deadlock_detected](/wiki/sqlstate/40P01/) are the primary retry-related transaction errors; PostgreSQL also documents selected `23505` key-selection races.\n- [`23503` — foreign_key_violation](/wiki/sqlstate/23503/) is another Class 23 integrity error, but a missing referenced row has different diagnosis and repair steps.\n\n## Sources and evidence {#sources}\n\nEvidence IDs used by this page are `identity.class-and-condition`, `runtime.dml-template`, `runtime.protocol-fields`, `runtime.index-build-template`, `runtime.logical-apply-sqlstate`, `runtime.tx-contexts`, `runtime.retry-boundary`, `runtime.on-conflict-scope`, `runtime.sequence-repair-limit`, `runtime.nulls-choice`, `runtime.detail-visibility`, and `runtime.version-boundary` in the [public evidence JSON](#sources). The selected runtime records use the base run for unreplaced cases, `23505-diagnostic-snippet-20260909` for DML, `23505-log-fields-final-20260909` for exact collector correlation, `23505-snippet-contract-20260909` for the registry excerpts, and the manual-boundary runs for explicit transaction and savepoint recovery. The separate boundary records are `runtime.23505-boundary-pg14-20260909.pg14` and `runtime.23505-boundary-pg15-20260909.pg15`; they are a version comparison, not additions to the base case count. Superseded full-run selections remain local audit data.\n\n- [PostgreSQL 18.6 `errcodes.txt` at the fixed source commit](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L235-L241) — Class 23 and `unique_violation` identity.\n- [PostgreSQL 18.6 nbtree unique check at the fixed source commit](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L640-L674) — DML message and protocol object attachment.\n- [PostgreSQL 18.6 index value description at the fixed source commit](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/genam.c#L155-L275) — detail visibility limits.\n- [PostgreSQL 18.6 index-build error at the fixed source commit](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/sort/tuplesortvariants.c#L1670-L1694) — separate build template.\n- [PostgreSQL 18.6 logical conflict reporter at the fixed source commit](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/conflict.c#L102-L180) — apply labels and SQLSTATE mapping.\n- [INSERT command reference](/docs/18/sql-insert.html) — conflict-target scope and arbiter restrictions.\n- [CREATE INDEX command reference](/docs/18/sql-createindex.html) — concurrent-build phases and invalid-index behavior.\n- [Error and Notice Message Fields](/docs/18/protocol-error-fields.html) and [server log configuration](/docs/18/runtime-config-logging.html) — protocol versus collector fields.\n- [PL/pgSQL control structures](/docs/18/plpgsql-control-structures.html), [transaction tutorial](/docs/18/tutorial-transactions.html), and [sequence functions](/docs/18/functions-sequence.html) — recovery and controlled repair semantics.\n","description":"PostgreSQL reports 23505 when a row or index operation violates a unique invariant. Diagnose the named object, recover the transaction, and choose a business-safe repair.","is_stale":false,"name":"","sections":[{"anchor":"at-a-glance","heading":"At a glance","html":"\u003cp\u003e\u003ccode\u003e23505\u003c/code\u003e is PostgreSQL's \u003ccode\u003eunique_violation\u003c/code\u003e condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.\u003c/p\u003e\n\u003cp\u003eFirst capture the complete ErrorResponse and the statement that failed. The most useful fields are \u003ccode\u003eC\u003c/code\u003e (SQLSTATE), \u003ccode\u003eM\u003c/code\u003e (primary message), \u003ccode\u003eD\u003c/code\u003e (detail), and, when supplied, \u003ccode\u003es\u003c/code\u003e (schema), \u003ccode\u003et\u003c/code\u003e (table), and \u003ccode\u003en\u003c/code\u003e (constraint or index). In psycopg, these are available through \u003ccode\u003eexc.sqlstate\u003c/code\u003e and \u003ccode\u003eexc.diag\u003c/code\u003e. The object fields belong to the wire protocol; they are not standard column names in CSV logs or keys in JSON logs.\u003c/p\u003e\n\u003cp\u003eThe recovery action depends on where the error occurred:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eAn autocommit statement fails, but that connection is ready for its next command.\u003c/li\u003e\n\u003cli\u003eA statement inside an explicit transaction leaves the transaction aborted. Roll back the transaction, or roll back to a savepoint, before issuing another statement. Otherwise PostgreSQL returns \u003ccode\u003e25P02\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eA deferred unique constraint can accept duplicate rows temporarily and report \u003ccode\u003e23505\u003c/code\u003e at \u003ccode\u003eCOMMIT\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eA PL/pgSQL \u003ccode\u003eEXCEPTION\u003c/code\u003e block can catch the violation in a subtransaction, provided the handler is narrow enough to identify the failing operation.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThe selected public runtime records cover 12 distinct passing cases on PostgreSQL 18.6 and 11 passing cases on PostgreSQL 10.21, with \u003ccode\u003eNULLS NOT DISTINCT\u003c/code\u003e marked not applicable on PG10. The full run remains the source for unreplaced cases; targeted final records select the DML diagnostic, exact \u003ccode\u003elog_fields\u003c/code\u003e correlation, registry excerpts, and manual transaction boundaries without duplicating or overriding those cases. A separate PG14.24/PG15.19 boundary comparison records unsupported syntax \u003ccode\u003e42601\u003c/code\u003e on PG14 and natural \u003ccode\u003e23505\u003c/code\u003e on PG15 for explicit \u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e; it is excluded from those base counts. The selected run IDs and structured observations are retained in the \u003ca href=\"#sources\"\u003epublic evidence JSON\u003c/a\u003e; superseded summaries and raw JSONL remain local audit data.\u003c/p\u003e\n\u003cp\u003eThe generated locked snapshots above are the catalogue's release-definition coverage. The executable compatibility targets in this page are PostgreSQL 18.6 and 10.21; the catalogue entry does not claim that 23505 was introduced in PostgreSQL 10.\u003c/p\u003e"},{"anchor":"meaning","heading":"Meaning and trigger paths","html":"\u003cp\u003eThe SQLSTATE directory places \u003ccode\u003e23505\u003c/code\u003e in Class 23, \u003ccode\u003eintegrity_constraint_violation\u003c/code\u003e, with the condition name \u003ccode\u003eunique_violation\u003c/code\u003e. In the normal btree path, PostgreSQL checks an index entry and raises an error when a conflicting committed or concurrently inserted key is not allowed by the index's semantics. A primary key is also a unique index, so a duplicate primary-key value uses this condition.\u003c/p\u003e\n\u003cp\u003eThe same SQLSTATE can describe several mechanisms:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003eDML against a unique constraint or index.\u003c/strong\u003e An \u003ccode\u003eINSERT\u003c/code\u003e, or an \u003ccode\u003eUPDATE\u003c/code\u003e that changes a key, can conflict with a row already protected by a unique index. The normal message template is \u003ccode\u003eduplicate key value violates unique constraint \"...\"\u003c/code\u003e; the optional detail is \u003ccode\u003eKey (...)=(...) already exists.\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eA unique index build.\u003c/strong\u003e Building a unique index over existing duplicate rows uses a different template: \u003ccode\u003ecould not create unique index \"...\"\u003c/code\u003e, with \u003ccode\u003eKey (...)=(...) is duplicated.\u003c/code\u003e This is an index-build failure, not an ordinary row-insert message.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eA deferred constraint.\u003c/strong\u003e With \u003ccode\u003eDEFERRABLE INITIALLY DEFERRED\u003c/code\u003e, the duplicate can remain in the transaction until the constraint check at commit. The error is therefore associated with \u003ccode\u003eCOMMIT\u003c/code\u003e, and a failed top-level commit rolls back that transaction.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eLogical replication apply.\u003c/strong\u003e PostgreSQL 18 classifies an apply conflict such as \u003ccode\u003einsert_exists\u003c/code\u003e; the conflict reporter still maps the relevant insert/update/multiple-unique paths to \u003ccode\u003e23505\u003c/code\u003e. The message shape and server log context are different from a client-side btree insert. This page has source and documentation evidence for that path, but the current runtime batch did not create a publisher/subscriber topology.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThe code tells you what class of condition occurred. It does not tell you whether the collision is a permanent business duplicate, a race in key selection, or a failed maintenance operation. That distinction comes from the statement, schema, constraint definition, transaction context, and any concurrent activity.\u003c/p\u003e\n\u003cp\u003eThe SQL blocks below are explanatory excerpts with the same operations as the named cases. The authoritative executable source is \u003ccode\u003escripts/verify_cases.py\u003c/code\u003e together with \u003ccode\u003everify/cases/23505/cases.json\u003c/code\u003e; the excerpts identify their case and omit only disposable schema naming and cleanup, so they are not a second runnable case definition.\u003c/p\u003e"},{"anchor":"messages","heading":"Messages and diagnostics","html":"\u003cp\u003eFor a normal DML conflict, the PostgreSQL 18.6 source path \u003ccode\u003enbtinsert.c\u003c/code\u003e calls \u003ccode\u003eBuildIndexValueDescription\u003c/code\u003e, then reports the unique violation and attaches the table and constraint identity. A representative run record was:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-text\"\u003eSQLSTATE: 23505\nseverity: ERROR\nmessage_primary: duplicate key value violates unique constraint \u0026quot;users_email_key\u0026quot;\nmessage_detail: Key (email)=(a@example.test) already exists.\nschema_name: c23505_dml_unique_conflict\ntable_name: users\nconstraint_name: users_email_key\nsource: nbtinsert.c / _bt_check_unique\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThat detail is conditional. PostgreSQL can omit key values when the caller lacks permission to inspect the relevant columns, when row-level security prevents the description, or for an expression index. The same run with an INSERT-only role kept SQLSTATE and object identity but had no \u003ccode\u003emessage_detail\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThe protocol fields are defined in the \u003ca href=\"/docs/18/protocol-error-fields.html\"\u003eError and Notice Message Fields\u003c/a\u003e reference. They should be read from the driver exception rather than inferred from a log parser. The 18.6 logging configuration describes CSV fields such as \u003ccode\u003esql_state_code\u003c/code\u003e, \u003ccode\u003emessage\u003c/code\u003e, and \u003ccode\u003edetail\u003c/code\u003e, and JSON fields such as \u003ccode\u003estate_code\u003c/code\u003e, \u003ccode\u003emessage\u003c/code\u003e, and \u003ccode\u003edetail\u003c/code\u003e; neither format defines the protocol's \u003ccode\u003econstraint_name\u003c/code\u003e as a standard field. The targeted \u003ccode\u003elog_fields\u003c/code\u003e run matched the collector records to the same backend PID, schema/table, constraint, primary message, and DETAIL as the driver diagnostic: PostgreSQL 18.6 exposed both CSV and JSON, while PostgreSQL 10.21 exposed CSV.\u003c/p\u003e\n\u003cp\u003eThe index-build message is deliberately separate:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-text\"\u003eSQLSTATE: 23505\nmessage_primary: could not create unique index \u0026quot;idx_concurrent\u0026quot;\nmessage_detail: Key (email)=(dup) is duplicated.\nsource: tuplesortvariants.c / comparetup_index_btree_tiebreak\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eDo not parse only the English message to classify this error. Branch on SQLSTATE, then use the structured fields and the operation context. Localized message text can change while the five-character SQLSTATE remains the stable protocol value.\u003c/p\u003e"},{"anchor":"diagnosis","heading":"Diagnosis","html":"\u003cp\u003eRecord the failed statement, SQLSTATE, primary message, detail, hint, schema/table/constraint fields, server version, and transaction status. A driver should expose the original exception; a generic ORM error string may discard fields needed to identify the conflicting object.\u003c/p\u003e\n\u003cp\u003eFor a named table, inspect both constraints and indexes before changing data. These are the \u003ccode\u003ediagnostic_catalog_queries\u003c/code\u003e statements used by the runner; the disposable run executes them against its \u003ccode\u003eaccounts\u003c/code\u003e table:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eSELECT conname, contype, condeferrable, condeferred,\n       pg_get_constraintdef(oid)\nFROM pg_constraint\nWHERE conrelid = 'accounts'::regclass;\n\nSELECT indexrelid::regclass AS index_name,\n       indisunique, indisvalid, indisready, indislive,\n       pg_get_indexdef(indexrelid)\nFROM pg_index\nWHERE indrelid = 'accounts'::regclass;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eFor an ordinary DML error, compare the attempted key with the row protected by the named constraint. Check every unique invariant on the table; a statement that names one conflict target can still violate another unique constraint. For an index-build error, find duplicate keys before retrying the build and inspect \u003ccode\u003epg_index\u003c/code\u003e after a concurrent failure.\u003c/p\u003e\n\u003cp\u003eThe runtime case \u003ccode\u003econcurrent_unique_conflict\u003c/code\u003e used two sessions and an observer. Session A held an uncommitted \u003ccode\u003etoken='raced'\u003c/code\u003e; before A committed, the observer saw B's statement with \u003ccode\u003ewait_event_type=Lock\u003c/code\u003e and \u003ccode\u003ewait_event=transactionid\u003c/code\u003e. After A committed, B received \u003ccode\u003e23505\u003c/code\u003e and was \u003ccode\u003eINERROR\u003c/code\u003e until rollback. This synchronization is evidence of the ordering; a fixed sleep would not establish it.\u003c/p\u003e"},{"anchor":"response","heading":"Response and repair","html":"\u003ch3\u003eRecover the transaction first (cases: \u003ccode\u003eexplicit_tx_abort_recovery\u003c/code\u003e, \u003ccode\u003esavepoint_recovery\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eWith autocommit enabled, the failed operation is complete and the connection was \u003ccode\u003eIDLE\u003c/code\u003e in the runtime cases. Decide what the application should do with the input, then issue a new command.\u003c/p\u003e\n\u003cp\u003eInside an explicit transaction, stop using the connection after the first failure until the failed transaction is handled:\u003c/p\u003e\n\u003cp\u003eThe \u003ccode\u003eINSERT INTO items VALUES (3, 'seed')\u003c/code\u003e statement below is the natural duplicate trigger; the following \u003ccode\u003eROLLBACK\u003c/code\u003e is the required recovery.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, 'seed');\nBEGIN;\nINSERT INTO items VALUES (2, 'outer');\nINSERT INTO items VALUES (3, 'seed');\nROLLBACK;\nBEGIN;\nINSERT INTO items VALUES (2, 'after rollback');\nCOMMIT;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIf only a part of the unit of work is optional, use a savepoint and retain the outer work:\u003c/p\u003e\n\u003cp\u003eThe insert after the savepoint reuses the seeded unique value, so it is the natural \u003ccode\u003e23505\u003c/code\u003e trigger. \u003ccode\u003eROLLBACK TO SAVEPOINT\u003c/code\u003e then removes only that failed subtransaction.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eCREATE TABLE items(id integer PRIMARY KEY, note text UNIQUE NOT NULL);\nINSERT INTO items VALUES (1, 'seed');\nBEGIN;\nINSERT INTO items VALUES (2, 'outer');\nSAVEPOINT unique_case;\nINSERT INTO items VALUES (3, 'seed');\n-- This statement is expected to return 25P02 while the transaction is failed.\nSELECT count(*) FROM items;\nROLLBACK TO SAVEPOINT unique_case;\nINSERT INTO items VALUES (3, 'after savepoint');\nRELEASE SAVEPOINT unique_case;\nCOMMIT;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe runner observed \u003ccode\u003e25P02\u003c/code\u003e when it issued a \u003ccode\u003eSELECT\u003c/code\u003e before rollback, then observed \u003ccode\u003eINTRANS\u003c/code\u003e after \u003ccode\u003eROLLBACK TO SAVEPOINT\u003c/code\u003e. A plain \u003ccode\u003eROLLBACK\u003c/code\u003e returns an explicit transaction to \u003ccode\u003eIDLE\u003c/code\u003e; \u003ccode\u003eROLLBACK TO\u003c/code\u003e preserves work before the savepoint.\u003c/p\u003e\n\u003cp\u003eA deferred constraint changes the failure point (case: \u003ccode\u003edeferred_commit_conflict\u003c/code\u003e). In the real case, both duplicate inserts succeeded while the connection was \u003ccode\u003eINTRANS\u003c/code\u003e; \u003ccode\u003eCOMMIT\u003c/code\u003e then raised \u003ccode\u003e23505\u003c/code\u003e, returned the connection to \u003ccode\u003eIDLE\u003c/code\u003e, and left zero rows from that failed top-level transaction. Fix the keys before commit or roll back and retry the entire unit of work.\u003c/p\u003e\n\u003cp\u003ePL/pgSQL can handle a natural unique violation inside an exception block (case: \u003ccode\u003eplpgsql_exception_recovery\u003c/code\u003e):\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id, note) VALUES (1, 'seed');\n\nCREATE FUNCTION try_insert(wanted integer) RETURNS text\nLANGUAGE plpgsql AS $$\nDECLARE returned_state text;\nBEGIN\n    INSERT INTO items(id, note) VALUES (wanted, 'body');\n    RETURN 'inserted';\nEXCEPTION WHEN unique_violation THEN\n    GET STACKED DIAGNOSTICS returned_state = RETURNED_SQLSTATE;\n    INSERT INTO items(id, note) VALUES (wanted + 1, 'handler');\n    RETURN returned_state;\nEND\n$$;\n\nSELECT try_insert(1);\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eThe protected block is executed with subtransaction behavior. If an error occurs, persistent changes made inside that block are rolled back before the handler runs; changes made before entering the block remain. Keep the handler narrow: if the block contains several statements that can violate different unique constraints, a caught \u003ccode\u003eunique_violation\u003c/code\u003e does not by itself prove which operation caused it. PostgreSQL's own PL/pgSQL documentation warns about this shape in generic upsert handlers.\u003c/p\u003e\n\u003ch3\u003eChoose the business operation (case: \u003ccode\u003eon_conflict_target_scope\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003e\u003ccode\u003eON CONFLICT\u003c/code\u003e is a tool for an intentional conflict policy, not a general instruction to hide duplicates. A conflict target chooses the arbiter. In the runtime case, an existing row occupied \u003ccode\u003ephone='phone-1'\u003c/code\u003e:\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eCREATE TABLE accounts(\n    id integer PRIMARY KEY,\n    email text NOT NULL,\n    phone text NOT NULL,\n    CONSTRAINT accounts_email_uq UNIQUE (email),\n    CONSTRAINT accounts_phone_uq UNIQUE (phone)\n);\nINSERT INTO accounts VALUES (1, 'existing@example.test', 'phone-1');\n\nINSERT INTO accounts(id,email,phone)\nVALUES (2, 'existing@example.test', 'phone-2')\nON CONFLICT (email) DO NOTHING;\n\n-- Handles an email conflict only. A phone-only conflict still raises 23505.\nINSERT INTO accounts(id,email,phone)\nVALUES (3, 'new@example.test', 'phone-1')\nON CONFLICT (email) DO NOTHING;\n\n-- With no target, DO NOTHING covers a conflict with any usable arbiter.\nINSERT INTO accounts(id,email,phone)\nVALUES (4, 'third@example.test', 'phone-1')\nON CONFLICT DO NOTHING;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eFor \u003ccode\u003eDO UPDATE\u003c/code\u003e, make the update deterministic and check its business result. For an idempotency key, compare the incoming request's relevant identity and parameters with the stored request, then verify the existing business result before returning “already processed.” A key collision alone is not proof that the earlier request was equivalent.\u003c/p\u003e\n\u003ch3\u003eRepair sequences carefully (case: \u003ccode\u003esequence_lag_repair\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eA manually supplied key can leave a sequence behind the table. The controlled runtime case used a non-default sequence:\u003c/p\u003e\n\u003cp\u003eThe second \u003ccode\u003enextval\u003c/code\u003e insert below is the natural duplicate trigger. The \u003ccode\u003esetval\u003c/code\u003e call is followed by a real insert that verifies the repaired next value.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003eCREATE SEQUENCE ids_seq START WITH 100 INCREMENT BY 7 MINVALUE 100 MAXVALUE 100000;\nCREATE TABLE items(id integer PRIMARY KEY, note text);\nINSERT INTO items(id,note) VALUES (100, 'explicit');\nINSERT INTO items(id,note) VALUES (nextval('ids_seq'), 'generated');\nSELECT setval('ids_seq', (SELECT max(id) FROM items), true);\nINSERT INTO items(id,note) VALUES (nextval('ids_seq'), 'after repair');\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAfter the controlled \u003ccode\u003esetval\u003c/code\u003e, the next value was 107. This is a repair pattern with explicit preconditions: quiesce writers, confirm the sequence identity and ownership, handle an empty table without passing an invalid value, and inspect increment, bounds, cache, and \u003ccode\u003eis_called\u003c/code\u003e. \u003ccode\u003esetval\u003c/code\u003e is not a universal concurrent repair; sequence changes are not rolled back like ordinary table writes.\u003c/p\u003e\n\u003ch3\u003eRetry only when the operation is retryable\u003c/h3\u003e\n\u003cp\u003eThe \u003ca href=\"/docs/18/mvcc-serialization-failure-handling.html\"\u003eserialization failure guidance\u003c/a\u003e documents a class of cases where concurrent key selection can surface as \u003ccode\u003e23505\u003c/code\u003e. When the application has established that meaning, retry the complete transaction, including the key-selection logic, and apply a bounded backoff and an idempotency policy. Do not retry blindly: a duplicate requested by the user can be permanent, and repeated retries can produce the same conflict.\u003c/p\u003e\n\u003cp\u003eFor the two-session case, the conflict happened after a lock-established ordering. The runner does not claim that every application operation with the same code is safe to retry.\u003c/p\u003e\n\u003ch3\u003eHandle failed concurrent index builds (case: \u003ccode\u003eindex_build_conflict\u003c/code\u003e)\u003c/h3\u003e\n\u003cp\u003eThe \u003ca href=\"/docs/18/sql-createindex.html\"\u003eCREATE INDEX documentation\u003c/a\u003e explains that a concurrent build can leave an \u003ccode\u003eINVALID\u003c/code\u003e index when a scan problem such as a uniqueness failure occurs. In this duplicate-scan case, \u003ccode\u003epg_index\u003c/code\u003e showed \u003ccode\u003eindisvalid=false\u003c/code\u003e, \u003ccode\u003eindisready=false\u003c/code\u003e, \u003ccode\u003eindislive=true\u003c/code\u003e, and \u003ccode\u003eindisunique=true\u003c/code\u003e; the regular transactional build left no index after rollback. Resolve duplicates, inspect the actual catalog state, drop a leftover invalid index when appropriate, and retry. Do not generalize this state to every possible \u003ccode\u003eCREATE INDEX CONCURRENTLY\u003c/code\u003e failure stage.\u003c/p\u003e"},{"anchor":"versions","heading":"Versions and boundaries","html":"\u003cp\u003eThe same SQLSTATE was observed in both PostgreSQL 10.21 and 18.6. Source line numbers and internal function names differ between those releases; use the SQLSTATE and the operation context rather than a source line as the compatibility contract.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e is available in PostgreSQL 15 and later and must be selected explicitly. The runtime case inserted two NULLs into a default unique column successfully, while a separately declared \u003ccode\u003eUNIQUE NULLS NOT DISTINCT\u003c/code\u003e constraint raised \u003ccode\u003e23505\u003c/code\u003e on the second NULL. An upgrade does not silently change the old default to NULLS NOT DISTINCT.\u003c/p\u003e\n\u003cp\u003eThe separate boundary comparison records the executed availability and behavior: PostgreSQL 14.24 accepted two ordinary \u003ccode\u003eNULL\u003c/code\u003e rows but rejected the explicit declaration with \u003ccode\u003e42601\u003c/code\u003e and no \u003ccode\u003e23505\u003c/code\u003e; PostgreSQL 15.19 raised \u003ccode\u003e23505\u003c/code\u003e on the second explicit \u003ccode\u003eNULL\u003c/code\u003e, left the autocommit session \u003ccode\u003eIDLE\u003c/code\u003e, and committed the valid repair. These records are retained separately and do not inflate the base selected case counts. On another disposable target, check the version before executing the branch: run \u003ccode\u003eordinary_create\u003c/code\u003e, \u003ccode\u003eordinary_first\u003c/code\u003e, \u003ccode\u003eordinary_second\u003c/code\u003e, and \u003ccode\u003eordinary_verify\u003c/code\u003e; then run \u003ccode\u003eexplicit_create\u003c/code\u003e. If \u003ccode\u003eexplicit_create\u003c/code\u003e returns the expected PG14 \u003ccode\u003e42601\u003c/code\u003e, stop that boundary case and do not send \u003ccode\u003eexplicit_first\u003c/code\u003e, \u003ccode\u003eexplicit_second\u003c/code\u003e, \u003ccode\u003eexplicit_repair\u003c/code\u003e, or \u003ccode\u003eexplicit_verify\u003c/code\u003e. Only when \u003ccode\u003eexplicit_create\u003c/code\u003e succeeds on PG15 or later should you continue with the explicit inserts, observe the second-NULL result, and then run the repair and verification steps.\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-sql\"\u003e-- ordinary_create\nCREATE TABLE ordinary_nulls (external_id integer UNIQUE);\n-- ordinary_first\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_second\nINSERT INTO ordinary_nulls VALUES (NULL);\n-- ordinary_verify\nSELECT count(*) FROM ordinary_nulls;\n-- explicit_create\nCREATE TABLE explicit_nulls (external_id integer, CONSTRAINT nulls_not_distinct_uq UNIQUE NULLS NOT DISTINCT (external_id));\n-- explicit_first\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_second\nINSERT INTO explicit_nulls VALUES (NULL);\n-- explicit_repair\nINSERT INTO explicit_nulls VALUES (1);\n-- explicit_verify\nSELECT count(*) FROM explicit_nulls;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ePostgreSQL 18's logical conflict reporter uses labels such as \u003ccode\u003einsert_exists\u003c/code\u003e in its apply context. That message change does not turn the relevant unique conflict into a different SQLSTATE. The current evidence is source and documentation based; the runtime report does not claim a replication topology was tested.\u003c/p\u003e\n\u003cp\u003eThe locked catalogue has a definition-presence observation for \u003ccode\u003e23505\u003c/code\u003e at PostgreSQL 7.4 and through the 8.4.22 pre-9.0 definitions, then in every listed formal snapshot through PostgreSQL 18.6 and the PostgreSQL 19 Beta 3 preview. This is a definition-only presence boundary, not an exact implementation introduction or runtime-use claim.\u003c/p\u003e"},{"anchor":"related","heading":"Related codes","html":"\u003cul\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/25P02/\"\u003e\u003ccode\u003e25P02\u003c/code\u003e — in_failed_sql_transaction\u003c/a\u003e explains the follow-on error after an unhandled statement failure in an explicit transaction.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/40001/\"\u003e\u003ccode\u003e40001\u003c/code\u003e — serialization_failure\u003c/a\u003e and \u003ca href=\"/wiki/sqlstate/40P01/\"\u003e\u003ccode\u003e40P01\u003c/code\u003e — deadlock_detected\u003c/a\u003e are the primary retry-related transaction errors; PostgreSQL also documents selected \u003ccode\u003e23505\u003c/code\u003e key-selection races.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/wiki/sqlstate/23503/\"\u003e\u003ccode\u003e23503\u003c/code\u003e — foreign_key_violation\u003c/a\u003e is another Class 23 integrity error, but a missing referenced row has different diagnosis and repair steps.\u003c/li\u003e\n\u003c/ul\u003e"},{"anchor":"sources","heading":"Sources and evidence","html":"\u003cp\u003eEvidence IDs used by this page are \u003ccode\u003eidentity.class-and-condition\u003c/code\u003e, \u003ccode\u003eruntime.dml-template\u003c/code\u003e, \u003ccode\u003eruntime.protocol-fields\u003c/code\u003e, \u003ccode\u003eruntime.index-build-template\u003c/code\u003e, \u003ccode\u003eruntime.logical-apply-sqlstate\u003c/code\u003e, \u003ccode\u003eruntime.tx-contexts\u003c/code\u003e, \u003ccode\u003eruntime.retry-boundary\u003c/code\u003e, \u003ccode\u003eruntime.on-conflict-scope\u003c/code\u003e, \u003ccode\u003eruntime.sequence-repair-limit\u003c/code\u003e, \u003ccode\u003eruntime.nulls-choice\u003c/code\u003e, \u003ccode\u003eruntime.detail-visibility\u003c/code\u003e, and \u003ccode\u003eruntime.version-boundary\u003c/code\u003e in the \u003ca href=\"#sources\"\u003epublic evidence JSON\u003c/a\u003e. The selected runtime records use the base run for unreplaced cases, \u003ccode\u003e23505-diagnostic-snippet-20260909\u003c/code\u003e for DML, \u003ccode\u003e23505-log-fields-final-20260909\u003c/code\u003e for exact collector correlation, \u003ccode\u003e23505-snippet-contract-20260909\u003c/code\u003e for the registry excerpts, and the manual-boundary runs for explicit transaction and savepoint recovery. The separate boundary records are \u003ccode\u003eruntime.23505-boundary-pg14-20260909.pg14\u003c/code\u003e and \u003ccode\u003eruntime.23505-boundary-pg15-20260909.pg15\u003c/code\u003e; they are a version comparison, not additions to the base case count. Superseded full-run selections remain local audit data.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L235-L241\"\u003ePostgreSQL 18.6 \u003ccode\u003eerrcodes.txt\u003c/code\u003e at the fixed source commit\u003c/a\u003e — Class 23 and \u003ccode\u003eunique_violation\u003c/code\u003e identity.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L640-L674\"\u003ePostgreSQL 18.6 nbtree unique check at the fixed source commit\u003c/a\u003e — DML message and protocol object attachment.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/genam.c#L155-L275\"\u003ePostgreSQL 18.6 index value description at the fixed source commit\u003c/a\u003e — detail visibility limits.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/sort/tuplesortvariants.c#L1670-L1694\"\u003ePostgreSQL 18.6 index-build error at the fixed source commit\u003c/a\u003e — separate build template.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/conflict.c#L102-L180\"\u003ePostgreSQL 18.6 logical conflict reporter at the fixed source commit\u003c/a\u003e — apply labels and SQLSTATE mapping.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/sql-insert.html\"\u003eINSERT command reference\u003c/a\u003e — conflict-target scope and arbiter restrictions.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/sql-createindex.html\"\u003eCREATE INDEX command reference\u003c/a\u003e — concurrent-build phases and invalid-index behavior.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/protocol-error-fields.html\"\u003eError and Notice Message Fields\u003c/a\u003e and \u003ca href=\"/docs/18/runtime-config-logging.html\"\u003eserver log configuration\u003c/a\u003e — protocol versus collector fields.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"/docs/18/plpgsql-control-structures.html\"\u003ePL/pgSQL control structures\u003c/a\u003e, \u003ca href=\"/docs/18/tutorial-transactions.html\"\u003etransaction tutorial\u003c/a\u003e, and \u003ca href=\"/docs/18/functions-sequence.html\"\u003esequence functions\u003c/a\u003e — recovery and controlled repair semantics.\u003c/li\u003e\n\u003c/ul\u003e"}],"summary":"23505 is PostgreSQL's unique_violation condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.","title":"23505 — unique_violation","translation_source_rev":"6852958e8b9926fc71c1258c68afedd3883ff869f8d677400e098b98d1aebf00"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":{"aliases":[],"catalogue_notes":{"earliest_observed":"7.4","formal_scope":"9.0.0..18.6","latest_observed":"18.6","matrix_scope":["9.0.23","9.1.24","9.2.24","9.3.25","9.4.26","9.5.25","9.6.24","10.23","11.22","12.22","13.23","14.24","15.19","16.15","17.11","18.6"],"pre9_scope":{"formal_tag_count":191,"maximum_release":"8.4.22","minimum_release":"7.0.0","source_definition_count":153,"source_doc_count":153,"source_file_count":306,"source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_tag_count":153},"pre9_status":"present","preview_scope":["19beta3"]},"class":"23","class_name":"Integrity Constraint Violation","condition_name":"unique_violation","condition_names":["unique_violation"],"definition_changes":[],"english_manuals":{"10":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"9607b57e9f639b61785677ba4d226f5889fe1d19c8bf55a3337691899a9073cd","slug":"10"},"lang":"en","sqlstate":"23505"},"11":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"3a024e38263ad77de228eed7930b842b42dc1d5cab9ca3727be8eed872ec9539","slug":"11"},"lang":"en","sqlstate":"23505"},"12":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"1444bd6a138537cd75be88a220ee9472ac528f0cfc58758e49636d85455efe98","slug":"12"},"lang":"en","sqlstate":"23505"},"13":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"4a3ef8af218e5736dfde8660ba609e84233b6b3bac7e0210ff8724cf1b27b2db","slug":"13"},"lang":"en","sqlstate":"23505"},"14":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"1c12e83304e0f4ff64c9d98ca5e3007df6756932ed19867a4fa0e0650f6c5751","slug":"14"},"lang":"en","sqlstate":"23505"},"15":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2161f58f6e87f6535b3b1f3d4661427bb6765f4f6b074fcc16fac97594b50599","slug":"15"},"lang":"en","sqlstate":"23505"},"16":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"928e705933d7c3d018ae3fba9d800b34e6325746d157339dce878473c519d100","slug":"16"},"lang":"en","sqlstate":"23505"},"17":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"868135520af87351e3ea1ba42656111cbd2d157d98e1fef05ea158ac5729d8b1","slug":"17"},"lang":"en","sqlstate":"23505"},"18":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"23505"},"19":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"63fb8d1aa9f494eeab9d0f8542a2b673f7746ee41ae2689d19403cb3cc425a5c","slug":"19"},"lang":"en","sqlstate":"23505"},"20":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"0d3f602127cd137cf343b32d5fa78f175eeb6cdcb6353b1f6f998ede6cb7b911","slug":"devel"},"lang":"en","sqlstate":"23505"},"8.1":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"0177b8818643540dec7bbef1fe92b60a3961debd52a68412301647ca146c7f2d","slug":"8.1"},"lang":"en","sqlstate":"23505"},"8.2":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"d65bf7cff5958c304352c974e477183e21efe9bd68e03786001874653bf66963","slug":"8.2"},"lang":"en","sqlstate":"23505"},"8.3":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"118059002973cdec5466ed3cabe7c9370b4c93d8ab542b8661d0eeb50cf6950d","slug":"8.3"},"lang":"en","sqlstate":"23505"},"8.4":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"d63b10001be0581484022e33b78124a36bb3bd68d3ebe022cd7dfb375233432f","slug":"8.4"},"lang":"en","sqlstate":"23505"},"9.0":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"658fc09c4c10eed7ac7dea4ed3e3eff8cc5791eb5af26b7b4a31b0f863b316db","slug":"9.0"},"lang":"en","sqlstate":"23505"},"9.1":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2d118b06c3b644c28b3ddefe9e4bef99a180321582209332372a5318f5bf8d1c","slug":"9.1"},"lang":"en","sqlstate":"23505"},"9.2":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2a37575b39c858d37c58fc4de6a16109554fd3306602294180d78faa1170d2cd","slug":"9.2"},"lang":"en","sqlstate":"23505"},"9.3":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2214b6869d764f7fba7221aefcdf1ab049b55ad51d63aa52054f3cd2c2533ae9","slug":"9.3"},"lang":"en","sqlstate":"23505"},"9.4":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"7243e2d653befe88733222ede67958f0c4b7fae967b58eb97807aeb3f32b4096","slug":"9.4"},"lang":"en","sqlstate":"23505"},"9.5":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"d40bc67cb331f1e4ccc0821ff57832c6c230edb0dce3ba4249defd21ae7ea29d","slug":"9.5"},"lang":"en","sqlstate":"23505"},"9.6":{"aliases":[],"class_name":"Integrity Constraint Violation","condition_name":"unique_violation","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"2ab55e487571c8998ec39b3d1bbae29ac6fc5c310875bee422d9a7b8b3fde5b3","slug":"9.6"},"lang":"en","sqlstate":"23505"}},"history_boundary":{"earliest_observed":"7.4","formal_tag_count":351,"gaps":[{"after":"18.6","before":"18.4","reason":"Non-adjacent release tags or a source gap; no removal is inferred."}],"latest_observed":"18.6","pre_range":{"first_observed":"7.4","known_lower_bound":"7.4 or earlier","last_observed":"8.4.22","notes":"Observed in the locked pre-9 formal release source; the label is a proven presence bound, not an exact introduction commit. Candidate source gaps remain for majors 7.0, 7.1, 7.2, 7.3.","scanned_formal_release_count":153,"scanned_source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_gap_majors":["7.0","7.1","7.2","7.3"],"status":"partially_scanned"},"preview_snapshots":["19beta3"],"scanned_from":"9.0.0","scanned_to":"18.6"},"introduced":null,"known_present_by":"7.4","macros":["ERRCODE_UNIQUE_VIOLATION"],"manual_presence":["8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"pre9_first_observed":"7.4","pre9_introduction_boundary":null,"pre9_last_observed":"8.4.22","pre9_presence_intervals":[{"end":"7.4.30","end_major":"7.4","end_tag":"REL7_4_30","evidence_count":31,"position":0,"start":"7.4","start_major":"7.4","start_tag":"REL7_4"},{"end":"8.0.26","end_major":"8.0","end_tag":"REL8_0_26","evidence_count":27,"position":1,"start":"8.0.0","start_major":"8.0","start_tag":"REL8_0_0"},{"end":"8.1.23","end_major":"8.1","end_tag":"REL8_1_23","evidence_count":24,"position":2,"start":"8.1.0","start_major":"8.1","start_tag":"REL8_1_0"},{"end":"8.2.23","end_major":"8.2","end_tag":"REL8_2_23","evidence_count":24,"position":3,"start":"8.2.0","start_major":"8.2","start_tag":"REL8_2_0"},{"end":"8.3.23","end_major":"8.3","end_tag":"REL8_3_23","evidence_count":24,"position":4,"start":"8.3.0","start_major":"8.3","start_tag":"REL8_3_0"},{"end":"8.4.22","end_major":"8.4","end_tag":"REL8_4_22","evidence_count":23,"position":5,"start":"8.4.0","start_major":"8.4","start_tag":"REL8_4_0"}],"pre9_status":"present","presence_intervals":[{"end":"9.0.23","end_major":"9.0","end_tag":"REL9_0_23","evidence_count":24,"position":0,"start":"9.0.0","start_major":"9.0","start_tag":"REL9_0_0"},{"end":"9.1.24","end_major":"9.1","end_tag":"REL9_1_24","evidence_count":25,"position":1,"start":"9.1.0","start_major":"9.1","start_tag":"REL9_1_0"},{"end":"9.2.24","end_major":"9.2","end_tag":"REL9_2_24","evidence_count":25,"position":2,"start":"9.2.0","start_major":"9.2","start_tag":"REL9_2_0"},{"end":"9.3.25","end_major":"9.3","end_tag":"REL9_3_25","evidence_count":26,"position":3,"start":"9.3.0","start_major":"9.3","start_tag":"REL9_3_0"},{"end":"9.4.26","end_major":"9.4","end_tag":"REL9_4_26","evidence_count":27,"position":4,"start":"9.4.0","start_major":"9.4","start_tag":"REL9_4_0"},{"end":"9.5.25","end_major":"9.5","end_tag":"REL9_5_25","evidence_count":26,"position":5,"start":"9.5.0","start_major":"9.5","start_tag":"REL9_5_0"},{"end":"9.6.24","end_major":"9.6","end_tag":"REL9_6_24","evidence_count":25,"position":6,"start":"9.6.0","start_major":"9.6","start_tag":"REL9_6_0"},{"end":"10.23","end_major":"10","end_tag":"REL_10_23","evidence_count":24,"position":7,"start":"10.0","start_major":"10","start_tag":"REL_10_0"},{"end":"11.22","end_major":"11","end_tag":"REL_11_22","evidence_count":23,"position":8,"start":"11.0","start_major":"11","start_tag":"REL_11_0"},{"end":"12.22","end_major":"12","end_tag":"REL_12_22","evidence_count":23,"position":9,"start":"12.0","start_major":"12","start_tag":"REL_12_0"},{"end":"13.23","end_major":"13","end_tag":"REL_13_23","evidence_count":24,"position":10,"start":"13.0","start_major":"13","start_tag":"REL_13_0"},{"end":"14.24","end_major":"14","end_tag":"REL_14_24","evidence_count":25,"position":11,"start":"14.0","start_major":"14","start_tag":"REL_14_0"},{"end":"15.19","end_major":"15","end_tag":"REL_15_19","evidence_count":20,"position":12,"start":"15.0","start_major":"15","start_tag":"REL_15_0"},{"end":"16.15","end_major":"16","end_tag":"REL_16_15","evidence_count":16,"position":13,"start":"16.0","start_major":"16","start_tag":"REL_16_0"},{"end":"17.11","end_major":"17","end_tag":"REL_17_11","evidence_count":12,"position":14,"start":"17.0","start_major":"17","start_tag":"REL_17_0"},{"end":"18.4","end_major":"18","end_tag":"REL_18_4","evidence_count":5,"position":15,"start":"18.0","start_major":"18","start_tag":"REL_18_0"},{"end":"18.6","end_major":"18","end_tag":"REL_18_6","evidence_count":1,"position":16,"start":"18.6","start_major":"18","start_tag":"REL_18_6"}],"present_in_snapshots":["9.0.23","9.1.24","9.2.24","9.3.25","9.4.26","9.5.25","9.6.24","10.23","11.22","12.22","13.23","14.24","15.19","16.15","17.11","18.6","19beta3"],"preview_in_snapshots":["19beta3"],"primary_macro":"ERRCODE_UNIQUE_VIOLATION","removed":null,"schema_version":2,"severity_classes":["E"],"sources":[{"channel":"formal","code_count":0,"commit":"3f78df10b168b78232fdbefe1d9d84c37f5aaaab","id":"postgresql:REL7_4:src/include/utils/errcodes.h","major":"7.4","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL7_4.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3f78df10b168b78232fdbefe1d9d84c37f5aaaab/src/include/utils/errcodes.h","record_count":0,"release":"7.4","repository":"https://github.com/postgres/postgres.git","sha256":"85e0d54037f0c49a06c909a4908fa24c19734c08f7f9611e5fbeb1b39745a539","size":18146,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL7_4","url":"https://github.com/postgres/postgres/blob/3f78df10b168b78232fdbefe1d9d84c37f5aaaab/src/include/utils/errcodes.h","version":"7.4"},{"channel":"formal","code_count":0,"commit":"c22b7eccd368754ea96865c046764382ab05db4b","id":"postgresql:REL8_0_0:src/include/utils/errcodes.h","major":"8.0","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_0_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/c22b7eccd368754ea96865c046764382ab05db4b/src/include/utils/errcodes.h","record_count":0,"release":"8.0.0","repository":"https://github.com/postgres/postgres.git","sha256":"8b928e18943235ff0543eab22189ade1a018de43d72275f28b79df7d14e47849","size":20020,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_0_0","url":"https://github.com/postgres/postgres/blob/c22b7eccd368754ea96865c046764382ab05db4b/src/include/utils/errcodes.h","version":"8.0.0"},{"channel":"formal","code_count":0,"commit":"2a80c3c4dc56a44a26805c889ef71b614e769266","id":"postgresql:REL8_1_0:src/include/utils/errcodes.h","major":"8.1","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_1_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/2a80c3c4dc56a44a26805c889ef71b614e769266/src/include/utils/errcodes.h","record_count":0,"release":"8.1.0","repository":"https://github.com/postgres/postgres.git","sha256":"52cab83d60a3b5fec10786b65bbfba39ef7404bc0e4599f6c239f2b56ad6a8ed","size":20109,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_1_0","url":"https://github.com/postgres/postgres/blob/2a80c3c4dc56a44a26805c889ef71b614e769266/src/include/utils/errcodes.h","version":"8.1.0"},{"channel":"formal","code_count":0,"commit":"2f52d7260ceac8e57613516d82a7404fbf3d137b","id":"postgresql:REL8_2_0:src/include/utils/errcodes.h","major":"8.2","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_2_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/2f52d7260ceac8e57613516d82a7404fbf3d137b/src/include/utils/errcodes.h","record_count":0,"release":"8.2.0","repository":"https://github.com/postgres/postgres.git","sha256":"1f13bd962e663bf5222198a4b30fb016f1f21141b2c4ed2be351595ecf04f269","size":20247,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_2_0","url":"https://github.com/postgres/postgres/blob/2f52d7260ceac8e57613516d82a7404fbf3d137b/src/include/utils/errcodes.h","version":"8.2.0"},{"channel":"formal","code_count":0,"commit":"9e647a13872a5f34dc0009566925c5c352463780","id":"postgresql:REL8_3_0:src/include/utils/errcodes.h","major":"8.3","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_3_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/9e647a13872a5f34dc0009566925c5c352463780/src/include/utils/errcodes.h","record_count":0,"release":"8.3.0","repository":"https://github.com/postgres/postgres.git","sha256":"8df5862003e7906ea11cf626431a426d1c7ae65d4fb85e526a46e29059b8e346","size":20650,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_3_0","url":"https://github.com/postgres/postgres/blob/9e647a13872a5f34dc0009566925c5c352463780/src/include/utils/errcodes.h","version":"8.3.0"},{"channel":"formal","code_count":0,"commit":"4d53a2f9699547bdc12831d2860c9d44c465e805","id":"postgresql:REL8_4_0:src/include/utils/errcodes.h","major":"8.4","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_4_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/4d53a2f9699547bdc12831d2860c9d44c465e805/src/include/utils/errcodes.h","record_count":0,"release":"8.4.0","repository":"https://github.com/postgres/postgres.git","sha256":"b1a08b6c8e85631fe7a849d531841247a641bb799bca739c929a78e6702d3ab4","size":21169,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_4_0","url":"https://github.com/postgres/postgres/blob/4d53a2f9699547bdc12831d2860c9d44c465e805/src/include/utils/errcodes.h","version":"8.4.0"},{"channel":"formal","code_count":0,"commit":"8dd387500abe58a684c559f20c26ac08884b0c5d","id":"postgresql:REL8_4_22:src/include/utils/errcodes.h","major":"8.4","path":"src/include/utils/errcodes.h","raw_path":".cache/catalogue/pre9/raw/definition/REL8_4_22.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/8dd387500abe58a684c559f20c26ac08884b0c5d/src/include/utils/errcodes.h","record_count":0,"release":"8.4.22","repository":"https://github.com/postgres/postgres.git","sha256":"43fd9924243ff5bb5f51b5e7a5e5d8a011458beb5bb669b1d5b6122dac515936","size":21170,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL8_4_22","url":"https://github.com/postgres/postgres/blob/8dd387500abe58a684c559f20c26ac08884b0c5d/src/include/utils/errcodes.h","version":"8.4.22"},{"blob_id":"sha256:c814fbe5a5d2a61abe5bcf5c7754a9d339664aa4ee73f46fa11ed14966ff6713","channel":"formal","code_count":198,"commit":"861861edcc04a6e3ebdfe363311f122e2b226196","id":"postgresql:REL9_0_0:src/include/utils/errcodes.h","major":"9.0","parsed_path":"raw/definitions/REL9_0_0.parsed.json","path":"src/include/utils/errcodes.h","raw_path":"raw/definitions/REL9_0_0.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/861861edcc04a6e3ebdfe363311f122e2b226196/src/include/utils/errcodes.h","record_count":204,"release":"9.0.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"c814fbe5a5d2a61abe5bcf5c7754a9d339664aa4ee73f46fa11ed14966ff6713","size":21313,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL9_0_0","url":"https://github.com/postgres/postgres/blob/861861edcc04a6e3ebdfe363311f122e2b226196/src/include/utils/errcodes.h","version":"9.0.0"},{"blob_id":"sha256:e23d5129578249fc242f2737be2a577d6714b57917aad9deaf5ec156cadc52fd","channel":"formal","code_count":199,"commit":"ffb39e1aedcdd7b77ec920221b27ab02c40ddbfc","id":"postgresql:REL9_0_4:src/include/utils/errcodes.h","major":"9.0","parsed_path":"raw/definitions/REL9_0_4.parsed.json","path":"src/include/utils/errcodes.h","raw_path":"raw/definitions/REL9_0_4.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/ffb39e1aedcdd7b77ec920221b27ab02c40ddbfc/src/include/utils/errcodes.h","record_count":205,"release":"9.0.4","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"e23d5129578249fc242f2737be2a577d6714b57917aad9deaf5ec156cadc52fd","size":21384,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL9_0_4","url":"https://github.com/postgres/postgres/blob/ffb39e1aedcdd7b77ec920221b27ab02c40ddbfc/src/include/utils/errcodes.h","version":"9.0.4"},{"blob_id":"sha256:5b77881aab6f0d659fb3295e1adf53799a02c3d5680200bb10ff9f15d741f924","channel":"formal","code_count":199,"commit":"391aa8aac11fe78f3b2f5743b56e78b0ad6a5d84","id":"postgresql:REL9_0_18:src/include/utils/errcodes.h","major":"9.0","parsed_path":"raw/definitions/REL9_0_18.parsed.json","path":"src/include/utils/errcodes.h","raw_path":"raw/definitions/REL9_0_18.h","raw_url":"https://raw.githubusercontent.com/postgres/postgres/391aa8aac11fe78f3b2f5743b56e78b0ad6a5d84/src/include/utils/errcodes.h","record_count":205,"release":"9.0.18","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"5b77881aab6f0d659fb3295e1adf53799a02c3d5680200bb10ff9f15d741f924","size":21385,"source_format":"errcodes.h","source_role":"primary_definition","tag":"REL9_0_18","url":"https://github.com/postgres/postgres/blob/391aa8aac11fe78f3b2f5743b56e78b0ad6a5d84/src/include/utils/errcodes.h","version":"9.0.18"},{"blob_id":"sha256:2b1d71c453a82488c4e95df84a9ee18dc8fdcb2532a7c56f44f1e8c4265a8132","channel":"formal","code_count":228,"commit":"1f43001424a9da624a89b213d0be606a8212a50a","id":"postgresql:REL9_1_0:src/backend/utils/errcodes.txt","major":"9.1","parsed_path":"raw/definitions/REL9_1_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_1_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/1f43001424a9da624a89b213d0be606a8212a50a/src/backend/utils/errcodes.txt","record_count":234,"release":"9.1.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"2b1d71c453a82488c4e95df84a9ee18dc8fdcb2532a7c56f44f1e8c4265a8132","size":29355,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_1_0","url":"https://github.com/postgres/postgres/blob/1f43001424a9da624a89b213d0be606a8212a50a/src/backend/utils/errcodes.txt","version":"9.1.0"},{"blob_id":"sha256:271a522fcd18ec45ebe4c1235af0e27a0e9bf0376fda4073b9f4a9c0a00fc711","channel":"formal","code_count":232,"commit":"ef47adb414e46099155c34529a2a5caeea02fc41","id":"postgresql:REL9_2_0:src/backend/utils/errcodes.txt","major":"9.2","parsed_path":"raw/definitions/REL9_2_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_2_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/ef47adb414e46099155c34529a2a5caeea02fc41/src/backend/utils/errcodes.txt","record_count":238,"release":"9.2.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"271a522fcd18ec45ebe4c1235af0e27a0e9bf0376fda4073b9f4a9c0a00fc711","size":30387,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_2_0","url":"https://github.com/postgres/postgres/blob/ef47adb414e46099155c34529a2a5caeea02fc41/src/backend/utils/errcodes.txt","version":"9.2.0"},{"blob_id":"sha256:f90d801e724191c84e94ae33483e71b4e3c4de5730474d316df4c722a149897d","channel":"formal","code_count":232,"commit":"da645b3a73580ac30cf02e932b42d06157b98229","id":"postgresql:REL9_3_0:src/backend/utils/errcodes.txt","major":"9.3","parsed_path":"raw/definitions/REL9_3_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_3_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/da645b3a73580ac30cf02e932b42d06157b98229/src/backend/utils/errcodes.txt","record_count":238,"release":"9.3.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"f90d801e724191c84e94ae33483e71b4e3c4de5730474d316df4c722a149897d","size":30387,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_3_0","url":"https://github.com/postgres/postgres/blob/da645b3a73580ac30cf02e932b42d06157b98229/src/backend/utils/errcodes.txt","version":"9.3.0"},{"blob_id":"sha256:1695ec274fb29f0b0875ff674405e775334243835a6f6008e007dfe3a8260bf5","channel":"formal","code_count":232,"commit":"8ca336f4ac3f08a5f23e76c6e9a5f2c8064f5883","id":"postgresql:REL9_4_0:src/backend/utils/errcodes.txt","major":"9.4","parsed_path":"raw/definitions/REL9_4_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_4_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/8ca336f4ac3f08a5f23e76c6e9a5f2c8064f5883/src/backend/utils/errcodes.txt","record_count":238,"release":"9.4.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"1695ec274fb29f0b0875ff674405e775334243835a6f6008e007dfe3a8260bf5","size":30387,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_4_0","url":"https://github.com/postgres/postgres/blob/8ca336f4ac3f08a5f23e76c6e9a5f2c8064f5883/src/backend/utils/errcodes.txt","version":"9.4.0"},{"blob_id":"sha256:37f728a7e034ef0b05b060a4b82c7dd95c900e4a5501c80bfefd8d679889253b","channel":"formal","code_count":236,"commit":"cdd4ed5449bf317cc71b45a8deee0173822e7592","id":"postgresql:REL9_5_0:src/backend/utils/errcodes.txt","major":"9.5","parsed_path":"raw/definitions/REL9_5_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_5_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/cdd4ed5449bf317cc71b45a8deee0173822e7592/src/backend/utils/errcodes.txt","record_count":242,"release":"9.5.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"37f728a7e034ef0b05b060a4b82c7dd95c900e4a5501c80bfefd8d679889253b","size":30798,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_5_0","url":"https://github.com/postgres/postgres/blob/cdd4ed5449bf317cc71b45a8deee0173822e7592/src/backend/utils/errcodes.txt","version":"9.5.0"},{"blob_id":"sha256:bf4d94d84c7cfe695cb80e8f009872444574719a80a72e347eb66ef3686b86ef","channel":"formal","code_count":238,"commit":"a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6","id":"postgresql:REL9_6_0:src/backend/utils/errcodes.txt","major":"9.6","parsed_path":"raw/definitions/REL9_6_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL9_6_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6/src/backend/utils/errcodes.txt","record_count":244,"release":"9.6.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"bf4d94d84c7cfe695cb80e8f009872444574719a80a72e347eb66ef3686b86ef","size":31135,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL9_6_0","url":"https://github.com/postgres/postgres/blob/a721a1ba9cf6c86cb52f1bf325d5a27b64e870d6/src/backend/utils/errcodes.txt","version":"9.6.0"},{"blob_id":"sha256:e5d829b24fe63aa69429fa1deb9675051fc8ffd4a8a4651861907a8f12ccb144","channel":"formal","code_count":240,"commit":"5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6","id":"postgresql:REL_10_0:src/backend/utils/errcodes.txt","major":"10","parsed_path":"raw/definitions/REL_10_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_10_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/src/backend/utils/errcodes.txt","record_count":246,"release":"10.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"e5d829b24fe63aa69429fa1deb9675051fc8ffd4a8a4651861907a8f12ccb144","size":31340,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_10_0","url":"https://github.com/postgres/postgres/blob/5df0e99bea1c3e5fbffa7fbd0982da88ea149bb6/src/backend/utils/errcodes.txt","version":"10.0"},{"blob_id":"sha256:8518be6de92ae135765e295c631c5f525120ca2b132453404b620f9aa595cab4","channel":"formal","code_count":241,"commit":"19f20081df059fef87e14c8e953669bd173dd7f1","id":"postgresql:REL_11_0:src/backend/utils/errcodes.txt","major":"11","parsed_path":"raw/definitions/REL_11_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_11_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/19f20081df059fef87e14c8e953669bd173dd7f1/src/backend/utils/errcodes.txt","record_count":247,"release":"11.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"8518be6de92ae135765e295c631c5f525120ca2b132453404b620f9aa595cab4","size":31453,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_11_0","url":"https://github.com/postgres/postgres/blob/19f20081df059fef87e14c8e953669bd173dd7f1/src/backend/utils/errcodes.txt","version":"11.0"},{"blob_id":"sha256:943259f3e36af1343dd0f090f7c7cec0e8c762b038d68c178aaa9b1b11999bfb","channel":"formal","code_count":257,"commit":"ad1f2885b8c82e0c2d56d7974f012cbecce17a17","id":"postgresql:REL_12_0:src/backend/utils/errcodes.txt","major":"12","parsed_path":"raw/definitions/REL_12_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_12_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/src/backend/utils/errcodes.txt","record_count":263,"release":"12.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"943259f3e36af1343dd0f090f7c7cec0e8c762b038d68c178aaa9b1b11999bfb","size":33114,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_12_0","url":"https://github.com/postgres/postgres/blob/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/src/backend/utils/errcodes.txt","version":"12.0"},{"blob_id":"sha256:9a464a3c3c99d2488782d4cdd0d46ce261085a944cb0c21e2d884586fbc8204d","channel":"formal","code_count":258,"commit":"29be9983a64c011eac0b9ee29895cce71e15ea77","id":"postgresql:REL_13_0:src/backend/utils/errcodes.txt","major":"13","parsed_path":"raw/definitions/REL_13_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_13_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/29be9983a64c011eac0b9ee29895cce71e15ea77/src/backend/utils/errcodes.txt","record_count":264,"release":"13.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"9a464a3c3c99d2488782d4cdd0d46ce261085a944cb0c21e2d884586fbc8204d","size":33239,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_13_0","url":"https://github.com/postgres/postgres/blob/29be9983a64c011eac0b9ee29895cce71e15ea77/src/backend/utils/errcodes.txt","version":"13.0"},{"blob_id":"sha256:c3c967fa20577f7ded946cb99e1a4706b85bb2476fd32d7e4a133c971a603552","channel":"formal","code_count":259,"commit":"86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c","id":"postgresql:REL_14_0:src/backend/utils/errcodes.txt","major":"14","parsed_path":"raw/definitions/REL_14_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_14_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/src/backend/utils/errcodes.txt","record_count":265,"release":"14.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"c3c967fa20577f7ded946cb99e1a4706b85bb2476fd32d7e4a133c971a603552","size":33337,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_14_0","url":"https://github.com/postgres/postgres/blob/86a4dc1e6f29d1992a2afa3fac1a0b0a6e84568c/src/backend/utils/errcodes.txt","version":"14.0"},{"blob_id":"sha256:a34b5fccd8a27c92817314dd942b79e76896cd1d9a8d4be21c81b02227850b4a","channel":"formal","code_count":260,"commit":"2a7ce2e2ce474504a707ec03e128fde66cfb8b48","id":"postgresql:REL_15_0:src/backend/utils/errcodes.txt","major":"15","parsed_path":"raw/definitions/REL_15_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_15_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/2a7ce2e2ce474504a707ec03e128fde66cfb8b48/src/backend/utils/errcodes.txt","record_count":266,"release":"15.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"a34b5fccd8a27c92817314dd942b79e76896cd1d9a8d4be21c81b02227850b4a","size":33458,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_15_0","url":"https://github.com/postgres/postgres/blob/2a7ce2e2ce474504a707ec03e128fde66cfb8b48/src/backend/utils/errcodes.txt","version":"15.0"},{"blob_id":"sha256:1d1d741b7b7c6dfd8275287e31c79befed75f3b9349e1a42ef0ca147c429ff88","channel":"formal","code_count":260,"commit":"c372fbbd8e911f2412b80a8c39d7079366565d67","id":"postgresql:REL_16_0:src/backend/utils/errcodes.txt","major":"16","parsed_path":"raw/definitions/REL_16_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_16_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/utils/errcodes.txt","record_count":266,"release":"16.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"1d1d741b7b7c6dfd8275287e31c79befed75f3b9349e1a42ef0ca147c429ff88","size":33458,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_16_0","url":"https://github.com/postgres/postgres/blob/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/utils/errcodes.txt","version":"16.0"},{"blob_id":"sha256:bb53279934510355eb4135a807c90d989f07650bd90f87026a4441f11d3296b1","channel":"formal","code_count":260,"commit":"d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e","id":"postgresql:REL_17_0:src/backend/utils/errcodes.txt","major":"17","parsed_path":"raw/definitions/REL_17_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_17_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/errcodes.txt","record_count":266,"release":"17.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"bb53279934510355eb4135a807c90d989f07650bd90f87026a4441f11d3296b1","size":33392,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_17_0","url":"https://github.com/postgres/postgres/blob/d7ec59a63d745ba74fba0e280bbf85dc6d1caa3e/src/backend/utils/errcodes.txt","version":"17.0"},{"blob_id":"sha256:6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","channel":"formal","code_count":262,"commit":"3d6a828938a5fa0444275d3d2f67b64ec3199eb7","id":"postgresql:REL_18_0:src/backend/utils/errcodes.txt","major":"18","parsed_path":"raw/definitions/REL_18_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_18_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","record_count":268,"release":"18.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_18_0","url":"https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","version":"18.0"},{"blob_id":"sha256:cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","channel":"preview","code_count":262,"commit":"3638289fb57bdabec00deda98ee9624a35f5d66a","id":"postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt","major":"19","parsed_path":"raw/definitions/REL_19_BETA3.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_19_BETA3.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","record_count":268,"release":"19beta3","release_date":"2026-08-13","repository":"https://github.com/postgres/postgres.git","sha256":"cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_19_BETA3","url":"https://github.com/postgres/postgres/blob/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","version":"19beta3"}],"sqlstate":"23505","status":"active","usage_evidence":[{"evidence_ids":["postgresql:REL7_4:src/include/utils/errcodes.h","postgresql:REL7_4_10:src/include/utils/errcodes.h","postgresql:REL7_4_11:src/include/utils/errcodes.h","postgresql:REL7_4_12:src/include/utils/errcodes.h","postgresql:REL7_4_13:src/include/utils/errcodes.h","postgresql:REL7_4_14:src/include/utils/errcodes.h","postgresql:REL7_4_15:src/include/utils/errcodes.h","postgresql:REL7_4_16:src/include/utils/errcodes.h","postgresql:REL7_4_17:src/include/utils/errcodes.h","postgresql:REL7_4_18:src/include/utils/errcodes.h","postgresql:REL7_4_19:src/include/utils/errcodes.h","postgresql:REL7_4_1:src/include/utils/errcodes.h","postgresql:REL7_4_20:src/include/utils/errcodes.h","postgresql:REL7_4_21:src/include/utils/errcodes.h","postgresql:REL7_4_22:src/include/utils/errcodes.h","postgresql:REL7_4_23:src/include/utils/errcodes.h","postgresql:REL7_4_24:src/include/utils/errcodes.h","postgresql:REL7_4_25:src/include/utils/errcodes.h","postgresql:REL7_4_26:src/include/utils/errcodes.h","postgresql:REL7_4_27:src/include/utils/errcodes.h","postgresql:REL7_4_28:src/include/utils/errcodes.h","postgresql:REL7_4_29:src/include/utils/errcodes.h","postgresql:REL7_4_2:src/include/utils/errcodes.h","postgresql:REL7_4_30:src/include/utils/errcodes.h","postgresql:REL7_4_3:src/include/utils/errcodes.h","postgresql:REL7_4_4:src/include/utils/errcodes.h","postgresql:REL7_4_5:src/include/utils/errcodes.h","postgresql:REL7_4_6:src/include/utils/errcodes.h","postgresql:REL7_4_7:src/include/utils/errcodes.h","postgresql:REL7_4_8:src/include/utils/errcodes.h","postgresql:REL7_4_9:src/include/utils/errcodes.h","postgresql:REL8_0_0:src/include/utils/errcodes.h","postgresql:REL8_0_10:src/include/utils/errcodes.h","postgresql:REL8_0_11:src/include/utils/errcodes.h","postgresql:REL8_0_12:src/include/utils/errcodes.h","postgresql:REL8_0_13:src/include/utils/errcodes.h","postgresql:REL8_0_14:src/include/utils/errcodes.h","postgresql:REL8_0_15:src/include/utils/errcodes.h","postgresql:REL8_0_16:src/include/utils/errcodes.h","postgresql:REL8_0_17:src/include/utils/errcodes.h","postgresql:REL8_0_18:src/include/utils/errcodes.h","postgresql:REL8_0_19:src/include/utils/errcodes.h","postgresql:REL8_0_1:src/include/utils/errcodes.h","postgresql:REL8_0_20:src/include/utils/errcodes.h","postgresql:REL8_0_21:src/include/utils/errcodes.h","postgresql:REL8_0_22:src/include/utils/errcodes.h","postgresql:REL8_0_23:src/include/utils/errcodes.h","postgresql:REL8_0_24:src/include/utils/errcodes.h","postgresql:REL8_0_25:src/include/utils/errcodes.h","postgresql:REL8_0_26:src/include/utils/errcodes.h","postgresql:REL8_0_2:src/include/utils/errcodes.h","postgresql:REL8_0_3:src/include/utils/errcodes.h","postgresql:REL8_0_4:src/include/utils/errcodes.h","postgresql:REL8_0_5:src/include/utils/errcodes.h","postgresql:REL8_0_6:src/include/utils/errcodes.h","postgresql:REL8_0_7:src/include/utils/errcodes.h","postgresql:REL8_0_8:src/include/utils/errcodes.h","postgresql:REL8_0_9:src/include/utils/errcodes.h","postgresql:REL8_1_0:src/include/utils/errcodes.h","postgresql:REL8_1_10:src/include/utils/errcodes.h","postgresql:REL8_1_11:src/include/utils/errcodes.h","postgresql:REL8_1_12:src/include/utils/errcodes.h","postgresql:REL8_1_13:src/include/utils/errcodes.h","postgresql:REL8_1_14:src/include/utils/errcodes.h","postgresql:REL8_1_15:src/include/utils/errcodes.h","postgresql:REL8_1_16:src/include/utils/errcodes.h","postgresql:REL8_1_17:src/include/utils/errcodes.h","postgresql:REL8_1_18:src/include/utils/errcodes.h","postgresql:REL8_1_19:src/include/utils/errcodes.h","postgresql:REL8_1_1:src/include/utils/errcodes.h","postgresql:REL8_1_20:src/include/utils/errcodes.h","postgresql:REL8_1_21:src/include/utils/errcodes.h","postgresql:REL8_1_22:src/include/utils/errcodes.h","postgresql:REL8_1_23:src/include/utils/errcodes.h","postgresql:REL8_1_2:src/include/utils/errcodes.h","postgresql:REL8_1_3:src/include/utils/errcodes.h","postgresql:REL8_1_4:src/include/utils/errcodes.h","postgresql:REL8_1_5:src/include/utils/errcodes.h","postgresql:REL8_1_6:src/include/utils/errcodes.h","postgresql:REL8_1_7:src/include/utils/errcodes.h","postgresql:REL8_1_8:src/include/utils/errcodes.h","postgresql:REL8_1_9:src/include/utils/errcodes.h","postgresql:REL8_2_0:src/include/utils/errcodes.h","postgresql:REL8_2_10:src/include/utils/errcodes.h","postgresql:REL8_2_11:src/include/utils/errcodes.h","postgresql:REL8_2_12:src/include/utils/errcodes.h","postgresql:REL8_2_13:src/include/utils/errcodes.h","postgresql:REL8_2_14:src/include/utils/errcodes.h","postgresql:REL8_2_15:src/include/utils/errcodes.h","postgresql:REL8_2_16:src/include/utils/errcodes.h","postgresql:REL8_2_17:src/include/utils/errcodes.h","postgresql:REL8_2_18:src/include/utils/errcodes.h","postgresql:REL8_2_19:src/include/utils/errcodes.h","postgresql:REL8_2_1:src/include/utils/errcodes.h","postgresql:REL8_2_20:src/include/utils/errcodes.h","postgresql:REL8_2_21:src/include/utils/errcodes.h","postgresql:REL8_2_22:src/include/utils/errcodes.h","postgresql:REL8_2_23:src/include/utils/errcodes.h","postgresql:REL8_2_2:src/include/utils/errcodes.h","postgresql:REL8_2_3:src/include/utils/errcodes.h","postgresql:REL8_2_4:src/include/utils/errcodes.h","postgresql:REL8_2_5:src/include/utils/errcodes.h","postgresql:REL8_2_6:src/include/utils/errcodes.h","postgresql:REL8_2_7:src/include/utils/errcodes.h","postgresql:REL8_2_8:src/include/utils/errcodes.h","postgresql:REL8_2_9:src/include/utils/errcodes.h","postgresql:REL8_3_0:src/include/utils/errcodes.h","postgresql:REL8_3_10:src/include/utils/errcodes.h","postgresql:REL8_3_11:src/include/utils/errcodes.h","postgresql:REL8_3_12:src/include/utils/errcodes.h","postgresql:REL8_3_13:src/include/utils/errcodes.h","postgresql:REL8_3_14:src/include/utils/errcodes.h","postgresql:REL8_3_15:src/include/utils/errcodes.h","postgresql:REL8_3_16:src/include/utils/errcodes.h","postgresql:REL8_3_17:src/include/utils/errcodes.h","postgresql:REL8_3_18:src/include/utils/errcodes.h","postgresql:REL8_3_19:src/include/utils/errcodes.h","postgresql:REL8_3_1:src/include/utils/errcodes.h","postgresql:REL8_3_20:src/include/utils/errcodes.h","postgresql:REL8_3_21:src/include/utils/errcodes.h","postgresql:REL8_3_22:src/include/utils/errcodes.h","postgresql:REL8_3_23:src/include/utils/errcodes.h","postgresql:REL8_3_2:src/include/utils/errcodes.h","postgresql:REL8_3_3:src/include/utils/errcodes.h","postgresql:REL8_3_4:src/include/utils/errcodes.h","postgresql:REL8_3_5:src/include/utils/errcodes.h","postgresql:REL8_3_6:src/include/utils/errcodes.h","postgresql:REL8_3_7:src/include/utils/errcodes.h","postgresql:REL8_3_8:src/include/utils/errcodes.h","postgresql:REL8_3_9:src/include/utils/errcodes.h","postgresql:REL8_4_0:src/include/utils/errcodes.h","postgresql:REL8_4_10:src/include/utils/errcodes.h","postgresql:REL8_4_11:src/include/utils/errcodes.h","postgresql:REL8_4_12:src/include/utils/errcodes.h","postgresql:REL8_4_13:src/include/utils/errcodes.h","postgresql:REL8_4_14:src/include/utils/errcodes.h","postgresql:REL8_4_15:src/include/utils/errcodes.h","postgresql:REL8_4_16:src/include/utils/errcodes.h","postgresql:REL8_4_17:src/include/utils/errcodes.h","postgresql:REL8_4_18:src/include/utils/errcodes.h","postgresql:REL8_4_19:src/include/utils/errcodes.h","postgresql:REL8_4_1:src/include/utils/errcodes.h","postgresql:REL8_4_20:src/include/utils/errcodes.h","postgresql:REL8_4_21:src/include/utils/errcodes.h","postgresql:REL8_4_22:src/include/utils/errcodes.h","postgresql:REL8_4_2:src/include/utils/errcodes.h","postgresql:REL8_4_3:src/include/utils/errcodes.h","postgresql:REL8_4_4:src/include/utils/errcodes.h","postgresql:REL8_4_5:src/include/utils/errcodes.h","postgresql:REL8_4_6:src/include/utils/errcodes.h","postgresql:REL8_4_7:src/include/utils/errcodes.h","postgresql:REL8_4_8:src/include/utils/errcodes.h","postgresql:REL8_4_9:src/include/utils/errcodes.h","postgresql:REL9_0_0:src/include/utils/errcodes.h","postgresql:REL9_0_10:src/include/utils/errcodes.h","postgresql:REL9_0_11:src/include/utils/errcodes.h","postgresql:REL9_0_12:src/include/utils/errcodes.h","postgresql:REL9_0_13:src/include/utils/errcodes.h","postgresql:REL9_0_14:src/include/utils/errcodes.h","postgresql:REL9_0_15:src/include/utils/errcodes.h","postgresql:REL9_0_16:src/include/utils/errcodes.h","postgresql:REL9_0_17:src/include/utils/errcodes.h","postgresql:REL9_0_18:src/include/utils/errcodes.h","postgresql:REL9_0_19:src/include/utils/errcodes.h","postgresql:REL9_0_1:src/include/utils/errcodes.h","postgresql:REL9_0_20:src/include/utils/errcodes.h","postgresql:REL9_0_21:src/include/utils/errcodes.h","postgresql:REL9_0_22:src/include/utils/errcodes.h","postgresql:REL9_0_23:src/include/utils/errcodes.h","postgresql:REL9_0_2:src/include/utils/errcodes.h","postgresql:REL9_0_3:src/include/utils/errcodes.h","postgresql:REL9_0_4:src/include/utils/errcodes.h","postgresql:REL9_0_5:src/include/utils/errcodes.h","postgresql:REL9_0_6:src/include/utils/errcodes.h","postgresql:REL9_0_7:src/include/utils/errcodes.h","postgresql:REL9_0_8:src/include/utils/errcodes.h","postgresql:REL9_0_9:src/include/utils/errcodes.h","postgresql:REL9_1_0:src/backend/utils/errcodes.txt","postgresql:REL9_1_10:src/backend/utils/errcodes.txt","postgresql:REL9_1_11:src/backend/utils/errcodes.txt","postgresql:REL9_1_12:src/backend/utils/errcodes.txt","postgresql:REL9_1_13:src/backend/utils/errcodes.txt","postgresql:REL9_1_14:src/backend/utils/errcodes.txt","postgresql:REL9_1_15:src/backend/utils/errcodes.txt","postgresql:REL9_1_16:src/backend/utils/errcodes.txt","postgresql:REL9_1_17:src/backend/utils/errcodes.txt","postgresql:REL9_1_18:src/backend/utils/errcodes.txt","postgresql:REL9_1_19:src/backend/utils/errcodes.txt","postgresql:REL9_1_1:src/backend/utils/errcodes.txt","postgresql:REL9_1_20:src/backend/utils/errcodes.txt","postgresql:REL9_1_21:src/backend/utils/errcodes.txt","postgresql:REL9_1_22:src/backend/utils/errcodes.txt","postgresql:REL9_1_23:src/backend/utils/errcodes.txt","postgresql:REL9_1_24:src/backend/utils/errcodes.txt","postgresql:REL9_1_2:src/backend/utils/errcodes.txt","postgresql:REL9_1_3:src/backend/utils/errcodes.txt","postgresql:REL9_1_4:src/backend/utils/errcodes.txt","postgresql:REL9_1_5:src/backend/utils/errcodes.txt","postgresql:REL9_1_6:src/backend/utils/errcodes.txt","postgresql:REL9_1_7:src/backend/utils/errcodes.txt","postgresql:REL9_1_8:src/backend/utils/errcodes.txt","postgresql:REL9_1_9:src/backend/utils/errcodes.txt","postgresql:REL9_2_0:src/backend/utils/errcodes.txt","postgresql:REL9_2_10:src/backend/utils/errcodes.txt","postgresql:REL9_2_11:src/backend/utils/errcodes.txt","postgresql:REL9_2_12:src/backend/utils/errcodes.txt","postgresql:REL9_2_13:src/backend/utils/errcodes.txt","postgresql:REL9_2_14:src/backend/utils/errcodes.txt","postgresql:REL9_2_15:src/backend/utils/errcodes.txt","postgresql:REL9_2_16:src/backend/utils/errcodes.txt","postgresql:REL9_2_17:src/backend/utils/errcodes.txt","postgresql:REL9_2_18:src/backend/utils/errcodes.txt","postgresql:REL9_2_19:src/backend/utils/errcodes.txt","postgresql:REL9_2_1:src/backend/utils/errcodes.txt","postgresql:REL9_2_20:src/backend/utils/errcodes.txt","postgresql:REL9_2_21:src/backend/utils/errcodes.txt","postgresql:REL9_2_22:src/backend/utils/errcodes.txt","postgresql:REL9_2_23:src/backend/utils/errcodes.txt","postgresql:REL9_2_24:src/backend/utils/errcodes.txt","postgresql:REL9_2_2:src/backend/utils/errcodes.txt","postgresql:REL9_2_3:src/backend/utils/errcodes.txt","postgresql:REL9_2_4:src/backend/utils/errcodes.txt","postgresql:REL9_2_5:src/backend/utils/errcodes.txt","postgresql:REL9_2_6:src/backend/utils/errcodes.txt","postgresql:REL9_2_7:src/backend/utils/errcodes.txt","postgresql:REL9_2_8:src/backend/utils/errcodes.txt","postgresql:REL9_2_9:src/backend/utils/errcodes.txt","postgresql:REL9_3_0:src/backend/utils/errcodes.txt","postgresql:REL9_3_10:src/backend/utils/errcodes.txt","postgresql:REL9_3_11:src/backend/utils/errcodes.txt","postgresql:REL9_3_12:src/backend/utils/errcodes.txt","postgresql:REL9_3_13:src/backend/utils/errcodes.txt","postgresql:REL9_3_14:src/backend/utils/errcodes.txt","postgresql:REL9_3_15:src/backend/utils/errcodes.txt","postgresql:REL9_3_16:src/backend/utils/errcodes.txt","postgresql:REL9_3_17:src/backend/utils/errcodes.txt","postgresql:REL9_3_18:src/backend/utils/errcodes.txt","postgresql:REL9_3_19:src/backend/utils/errcodes.txt","postgresql:REL9_3_1:src/backend/utils/errcodes.txt","postgresql:REL9_3_20:src/backend/utils/errcodes.txt","postgresql:REL9_3_21:src/backend/utils/errcodes.txt","postgresql:REL9_3_22:src/backend/utils/errcodes.txt","postgresql:REL9_3_23:src/backend/utils/errcodes.txt","postgresql:REL9_3_24:src/backend/utils/errcodes.txt","postgresql:REL9_3_25:src/backend/utils/errcodes.txt","postgresql:REL9_3_2:src/backend/utils/errcodes.txt","postgresql:REL9_3_3:src/backend/utils/errcodes.txt","postgresql:REL9_3_4:src/backend/utils/errcodes.txt","postgresql:REL9_3_5:src/backend/utils/errcodes.txt","postgresql:REL9_3_6:src/backend/utils/errcodes.txt","postgresql:REL9_3_7:src/backend/utils/errcodes.txt","postgresql:REL9_3_8:src/backend/utils/errcodes.txt","postgresql:REL9_3_9:src/backend/utils/errcodes.txt","postgresql:REL9_4_0:src/backend/utils/errcodes.txt","postgresql:REL9_4_10:src/backend/utils/errcodes.txt","postgresql:REL9_4_11:src/backend/utils/errcodes.txt","postgresql:REL9_4_12:src/backend/utils/errcodes.txt","postgresql:REL9_4_13:src/backend/utils/errcodes.txt","postgresql:REL9_4_14:src/backend/utils/errcodes.txt","postgresql:REL9_4_15:src/backend/utils/errcodes.txt","postgresql:REL9_4_16:src/backend/utils/errcodes.txt","postgresql:REL9_4_17:src/backend/utils/errcodes.txt","postgresql:REL9_4_18:src/backend/utils/errcodes.txt","postgresql:REL9_4_19:src/backend/utils/errcodes.txt","postgresql:REL9_4_1:src/backend/utils/errcodes.txt","postgresql:REL9_4_20:src/backend/utils/errcodes.txt","postgresql:REL9_4_21:src/backend/utils/errcodes.txt","postgresql:REL9_4_22:src/backend/utils/errcodes.txt","postgresql:REL9_4_23:src/backend/utils/errcodes.txt","postgresql:REL9_4_24:src/backend/utils/errcodes.txt","postgresql:REL9_4_25:src/backend/utils/errcodes.txt","postgresql:REL9_4_26:src/backend/utils/errcodes.txt","postgresql:REL9_4_2:src/backend/utils/errcodes.txt","postgresql:REL9_4_3:src/backend/utils/errcodes.txt","postgresql:REL9_4_4:src/backend/utils/errcodes.txt","postgresql:REL9_4_5:src/backend/utils/errcodes.txt","postgresql:REL9_4_6:src/backend/utils/errcodes.txt","postgresql:REL9_4_7:src/backend/utils/errcodes.txt","postgresql:REL9_4_8:src/backend/utils/errcodes.txt","postgresql:REL9_4_9:src/backend/utils/errcodes.txt","postgresql:REL9_5_0:src/backend/utils/errcodes.txt","postgresql:REL9_5_10:src/backend/utils/errcodes.txt","postgresql:REL9_5_11:src/backend/utils/errcodes.txt","postgresql:REL9_5_12:src/backend/utils/errcodes.txt","postgresql:REL9_5_13:src/backend/utils/errcodes.txt","postgresql:REL9_5_14:src/backend/utils/errcodes.txt","postgresql:REL9_5_15:src/backend/utils/errcodes.txt","postgresql:REL9_5_16:src/backend/utils/errcodes.txt","postgresql:REL9_5_17:src/backend/utils/errcodes.txt","postgresql:REL9_5_18:src/backend/utils/errcodes.txt","postgresql:REL9_5_19:src/backend/utils/errcodes.txt","postgresql:REL9_5_1:src/backend/utils/errcodes.txt","postgresql:REL9_5_20:src/backend/utils/errcodes.txt","postgresql:REL9_5_21:src/backend/utils/errcodes.txt","postgresql:REL9_5_22:src/backend/utils/errcodes.txt","postgresql:REL9_5_23:src/backend/utils/errcodes.txt","postgresql:REL9_5_24:src/backend/utils/errcodes.txt","postgresql:REL9_5_25:src/backend/utils/errcodes.txt","postgresql:REL9_5_2:src/backend/utils/errcodes.txt","postgresql:REL9_5_3:src/backend/utils/errcodes.txt","postgresql:REL9_5_4:src/backend/utils/errcodes.txt","postgresql:REL9_5_5:src/backend/utils/errcodes.txt","postgresql:REL9_5_6:src/backend/utils/errcodes.txt","postgresql:REL9_5_7:src/backend/utils/errcodes.txt","postgresql:REL9_5_8:src/backend/utils/errcodes.txt","postgresql:REL9_5_9:src/backend/utils/errcodes.txt","postgresql:REL9_6_0:src/backend/utils/errcodes.txt","postgresql:REL9_6_10:src/backend/utils/errcodes.txt","postgresql:REL9_6_11:src/backend/utils/errcodes.txt","postgresql:REL9_6_12:src/backend/utils/errcodes.txt","postgresql:REL9_6_13:src/backend/utils/errcodes.txt","postgresql:REL9_6_14:src/backend/utils/errcodes.txt","postgresql:REL9_6_15:src/backend/utils/errcodes.txt","postgresql:REL9_6_16:src/backend/utils/errcodes.txt","postgresql:REL9_6_17:src/backend/utils/errcodes.txt","postgresql:REL9_6_18:src/backend/utils/errcodes.txt","postgresql:REL9_6_19:src/backend/utils/errcodes.txt","postgresql:REL9_6_1:src/backend/utils/errcodes.txt","postgresql:REL9_6_20:src/backend/utils/errcodes.txt","postgresql:REL9_6_21:src/backend/utils/errcodes.txt","postgresql:REL9_6_22:src/backend/utils/errcodes.txt","postgresql:REL9_6_23:src/backend/utils/errcodes.txt","postgresql:REL9_6_24:src/backend/utils/errcodes.txt","postgresql:REL9_6_2:src/backend/utils/errcodes.txt","postgresql:REL9_6_3:src/backend/utils/errcodes.txt","postgresql:REL9_6_4:src/backend/utils/errcodes.txt","postgresql:REL9_6_5:src/backend/utils/errcodes.txt","postgresql:REL9_6_6:src/backend/utils/errcodes.txt","postgresql:REL9_6_7:src/backend/utils/errcodes.txt","postgresql:REL9_6_8:src/backend/utils/errcodes.txt","postgresql:REL9_6_9:src/backend/utils/errcodes.txt","postgresql:REL_10_0:src/backend/utils/errcodes.txt","postgresql:REL_10_10:src/backend/utils/errcodes.txt","postgresql:REL_10_11:src/backend/utils/errcodes.txt","postgresql:REL_10_12:src/backend/utils/errcodes.txt","postgresql:REL_10_13:src/backend/utils/errcodes.txt","postgresql:REL_10_14:src/backend/utils/errcodes.txt","postgresql:REL_10_15:src/backend/utils/errcodes.txt","postgresql:REL_10_16:src/backend/utils/errcodes.txt","postgresql:REL_10_17:src/backend/utils/errcodes.txt","postgresql:REL_10_18:src/backend/utils/errcodes.txt","postgresql:REL_10_19:src/backend/utils/errcodes.txt","postgresql:REL_10_1:src/backend/utils/errcodes.txt","postgresql:REL_10_20:src/backend/utils/errcodes.txt","postgresql:REL_10_21:src/backend/utils/errcodes.txt","postgresql:REL_10_22:src/backend/utils/errcodes.txt","postgresql:REL_10_23:src/backend/utils/errcodes.txt","postgresql:REL_10_2:src/backend/utils/errcodes.txt","postgresql:REL_10_3:src/backend/utils/errcodes.txt","postgresql:REL_10_4:src/backend/utils/errcodes.txt","postgresql:REL_10_5:src/backend/utils/errcodes.txt","postgresql:REL_10_6:src/backend/utils/errcodes.txt","postgresql:REL_10_7:src/backend/utils/errcodes.txt","postgresql:REL_10_8:src/backend/utils/errcodes.txt","postgresql:REL_10_9:src/backend/utils/errcodes.txt","postgresql:REL_11_0:src/backend/utils/errcodes.txt","postgresql:REL_11_10:src/backend/utils/errcodes.txt","postgresql:REL_11_11:src/backend/utils/errcodes.txt","postgresql:REL_11_12:src/backend/utils/errcodes.txt","postgresql:REL_11_13:src/backend/utils/errcodes.txt","postgresql:REL_11_14:src/backend/utils/errcodes.txt","postgresql:REL_11_15:src/backend/utils/errcodes.txt","postgresql:REL_11_16:src/backend/utils/errcodes.txt","postgresql:REL_11_17:src/backend/utils/errcodes.txt","postgresql:REL_11_18:src/backend/utils/errcodes.txt","postgresql:REL_11_19:src/backend/utils/errcodes.txt","postgresql:REL_11_1:src/backend/utils/errcodes.txt","postgresql:REL_11_20:src/backend/utils/errcodes.txt","postgresql:REL_11_21:src/backend/utils/errcodes.txt","postgresql:REL_11_22:src/backend/utils/errcodes.txt","postgresql:REL_11_2:src/backend/utils/errcodes.txt","postgresql:REL_11_3:src/backend/utils/errcodes.txt","postgresql:REL_11_4:src/backend/utils/errcodes.txt","postgresql:REL_11_5:src/backend/utils/errcodes.txt","postgresql:REL_11_6:src/backend/utils/errcodes.txt","postgresql:REL_11_7:src/backend/utils/errcodes.txt","postgresql:REL_11_8:src/backend/utils/errcodes.txt","postgresql:REL_11_9:src/backend/utils/errcodes.txt","postgresql:REL_12_0:src/backend/utils/errcodes.txt","postgresql:REL_12_10:src/backend/utils/errcodes.txt","postgresql:REL_12_11:src/backend/utils/errcodes.txt","postgresql:REL_12_12:src/backend/utils/errcodes.txt","postgresql:REL_12_13:src/backend/utils/errcodes.txt","postgresql:REL_12_14:src/backend/utils/errcodes.txt","postgresql:REL_12_15:src/backend/utils/errcodes.txt","postgresql:REL_12_16:src/backend/utils/errcodes.txt","postgresql:REL_12_17:src/backend/utils/errcodes.txt","postgresql:REL_12_18:src/backend/utils/errcodes.txt","postgresql:REL_12_19:src/backend/utils/errcodes.txt","postgresql:REL_12_1:src/backend/utils/errcodes.txt","postgresql:REL_12_20:src/backend/utils/errcodes.txt","postgresql:REL_12_21:src/backend/utils/errcodes.txt","postgresql:REL_12_22:src/backend/utils/errcodes.txt","postgresql:REL_12_2:src/backend/utils/errcodes.txt","postgresql:REL_12_3:src/backend/utils/errcodes.txt","postgresql:REL_12_4:src/backend/utils/errcodes.txt","postgresql:REL_12_5:src/backend/utils/errcodes.txt","postgresql:REL_12_6:src/backend/utils/errcodes.txt","postgresql:REL_12_7:src/backend/utils/errcodes.txt","postgresql:REL_12_8:src/backend/utils/errcodes.txt","postgresql:REL_12_9:src/backend/utils/errcodes.txt","postgresql:REL_13_0:src/backend/utils/errcodes.txt","postgresql:REL_13_10:src/backend/utils/errcodes.txt","postgresql:REL_13_11:src/backend/utils/errcodes.txt","postgresql:REL_13_12:src/backend/utils/errcodes.txt","postgresql:REL_13_13:src/backend/utils/errcodes.txt","postgresql:REL_13_14:src/backend/utils/errcodes.txt","postgresql:REL_13_15:src/backend/utils/errcodes.txt","postgresql:REL_13_16:src/backend/utils/errcodes.txt","postgresql:REL_13_17:src/backend/utils/errcodes.txt","postgresql:REL_13_18:src/backend/utils/errcodes.txt","postgresql:REL_13_19:src/backend/utils/errcodes.txt","postgresql:REL_13_1:src/backend/utils/errcodes.txt","postgresql:REL_13_20:src/backend/utils/errcodes.txt","postgresql:REL_13_21:src/backend/utils/errcodes.txt","postgresql:REL_13_22:src/backend/utils/errcodes.txt","postgresql:REL_13_23:src/backend/utils/errcodes.txt","postgresql:REL_13_2:src/backend/utils/errcodes.txt","postgresql:REL_13_3:src/backend/utils/errcodes.txt","postgresql:REL_13_4:src/backend/utils/errcodes.txt","postgresql:REL_13_5:src/backend/utils/errcodes.txt","postgresql:REL_13_6:src/backend/utils/errcodes.txt","postgresql:REL_13_7:src/backend/utils/errcodes.txt","postgresql:REL_13_8:src/backend/utils/errcodes.txt","postgresql:REL_13_9:src/backend/utils/errcodes.txt","postgresql:REL_14_0:src/backend/utils/errcodes.txt","postgresql:REL_14_10:src/backend/utils/errcodes.txt","postgresql:REL_14_11:src/backend/utils/errcodes.txt","postgresql:REL_14_12:src/backend/utils/errcodes.txt","postgresql:REL_14_13:src/backend/utils/errcodes.txt","postgresql:REL_14_14:src/backend/utils/errcodes.txt","postgresql:REL_14_15:src/backend/utils/errcodes.txt","postgresql:REL_14_16:src/backend/utils/errcodes.txt","postgresql:REL_14_17:src/backend/utils/errcodes.txt","postgresql:REL_14_18:src/backend/utils/errcodes.txt","postgresql:REL_14_19:src/backend/utils/errcodes.txt","postgresql:REL_14_1:src/backend/utils/errcodes.txt","postgresql:REL_14_20:src/backend/utils/errcodes.txt","postgresql:REL_14_21:src/backend/utils/errcodes.txt","postgresql:REL_14_22:src/backend/utils/errcodes.txt","postgresql:REL_14_23:src/backend/utils/errcodes.txt","postgresql:REL_14_24:src/backend/utils/errcodes.txt","postgresql:REL_14_2:src/backend/utils/errcodes.txt","postgresql:REL_14_3:src/backend/utils/errcodes.txt","postgresql:REL_14_4:src/backend/utils/errcodes.txt","postgresql:REL_14_5:src/backend/utils/errcodes.txt","postgresql:REL_14_6:src/backend/utils/errcodes.txt","postgresql:REL_14_7:src/backend/utils/errcodes.txt","postgresql:REL_14_8:src/backend/utils/errcodes.txt","postgresql:REL_14_9:src/backend/utils/errcodes.txt","postgresql:REL_15_0:src/backend/utils/errcodes.txt","postgresql:REL_15_10:src/backend/utils/errcodes.txt","postgresql:REL_15_11:src/backend/utils/errcodes.txt","postgresql:REL_15_12:src/backend/utils/errcodes.txt","postgresql:REL_15_13:src/backend/utils/errcodes.txt","postgresql:REL_15_14:src/backend/utils/errcodes.txt","postgresql:REL_15_15:src/backend/utils/errcodes.txt","postgresql:REL_15_16:src/backend/utils/errcodes.txt","postgresql:REL_15_17:src/backend/utils/errcodes.txt","postgresql:REL_15_18:src/backend/utils/errcodes.txt","postgresql:REL_15_19:src/backend/utils/errcodes.txt","postgresql:REL_15_1:src/backend/utils/errcodes.txt","postgresql:REL_15_2:src/backend/utils/errcodes.txt","postgresql:REL_15_3:src/backend/utils/errcodes.txt","postgresql:REL_15_4:src/backend/utils/errcodes.txt","postgresql:REL_15_5:src/backend/utils/errcodes.txt","postgresql:REL_15_6:src/backend/utils/errcodes.txt","postgresql:REL_15_7:src/backend/utils/errcodes.txt","postgresql:REL_15_8:src/backend/utils/errcodes.txt","postgresql:REL_15_9:src/backend/utils/errcodes.txt","postgresql:REL_16_0:src/backend/utils/errcodes.txt","postgresql:REL_16_10:src/backend/utils/errcodes.txt","postgresql:REL_16_11:src/backend/utils/errcodes.txt","postgresql:REL_16_12:src/backend/utils/errcodes.txt","postgresql:REL_16_13:src/backend/utils/errcodes.txt","postgresql:REL_16_14:src/backend/utils/errcodes.txt","postgresql:REL_16_15:src/backend/utils/errcodes.txt","postgresql:REL_16_1:src/backend/utils/errcodes.txt","postgresql:REL_16_2:src/backend/utils/errcodes.txt","postgresql:REL_16_3:src/backend/utils/errcodes.txt","postgresql:REL_16_4:src/backend/utils/errcodes.txt","postgresql:REL_16_5:src/backend/utils/errcodes.txt","postgresql:REL_16_6:src/backend/utils/errcodes.txt","postgresql:REL_16_7:src/backend/utils/errcodes.txt","postgresql:REL_16_8:src/backend/utils/errcodes.txt","postgresql:REL_16_9:src/backend/utils/errcodes.txt","postgresql:REL_17_0:src/backend/utils/errcodes.txt","postgresql:REL_17_10:src/backend/utils/errcodes.txt","postgresql:REL_17_11:src/backend/utils/errcodes.txt","postgresql:REL_17_1:src/backend/utils/errcodes.txt","postgresql:REL_17_2:src/backend/utils/errcodes.txt","postgresql:REL_17_3:src/backend/utils/errcodes.txt","postgresql:REL_17_4:src/backend/utils/errcodes.txt","postgresql:REL_17_5:src/backend/utils/errcodes.txt","postgresql:REL_17_6:src/backend/utils/errcodes.txt","postgresql:REL_17_7:src/backend/utils/errcodes.txt","postgresql:REL_17_8:src/backend/utils/errcodes.txt","postgresql:REL_17_9:src/backend/utils/errcodes.txt","postgresql:REL_18_0:src/backend/utils/errcodes.txt","postgresql:REL_18_1:src/backend/utils/errcodes.txt","postgresql:REL_18_2:src/backend/utils/errcodes.txt","postgresql:REL_18_3:src/backend/utils/errcodes.txt","postgresql:REL_18_4:src/backend/utils/errcodes.txt","postgresql:REL_18_6:src/backend/utils/errcodes.txt","postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt"],"notes":"Presence in a PostgreSQL release definition file is established; runtime throw/use scanning is maintained separately.","scope":"release-definition-catalogue","status":"definition_only"},{"evidence_ids":["postgresql:REL7_4:src/include/utils/errcodes.h","postgresql:REL7_4_10:src/include/utils/errcodes.h","postgresql:REL7_4_11:src/include/utils/errcodes.h","postgresql:REL7_4_12:src/include/utils/errcodes.h","postgresql:REL7_4_13:src/include/utils/errcodes.h","postgresql:REL7_4_14:src/include/utils/errcodes.h","postgresql:REL7_4_15:src/include/utils/errcodes.h","postgresql:REL7_4_16:src/include/utils/errcodes.h","postgresql:REL7_4_17:src/include/utils/errcodes.h","postgresql:REL7_4_18:src/include/utils/errcodes.h","postgresql:REL7_4_19:src/include/utils/errcodes.h","postgresql:REL7_4_1:src/include/utils/errcodes.h","postgresql:REL7_4_20:src/include/utils/errcodes.h","postgresql:REL7_4_21:src/include/utils/errcodes.h","postgresql:REL7_4_22:src/include/utils/errcodes.h","postgresql:REL7_4_23:src/include/utils/errcodes.h","postgresql:REL7_4_24:src/include/utils/errcodes.h","postgresql:REL7_4_25:src/include/utils/errcodes.h","postgresql:REL7_4_26:src/include/utils/errcodes.h","postgresql:REL7_4_27:src/include/utils/errcodes.h","postgresql:REL7_4_28:src/include/utils/errcodes.h","postgresql:REL7_4_29:src/include/utils/errcodes.h","postgresql:REL7_4_2:src/include/utils/errcodes.h","postgresql:REL7_4_30:src/include/utils/errcodes.h","postgresql:REL7_4_3:src/include/utils/errcodes.h","postgresql:REL7_4_4:src/include/utils/errcodes.h","postgresql:REL7_4_5:src/include/utils/errcodes.h","postgresql:REL7_4_6:src/include/utils/errcodes.h","postgresql:REL7_4_7:src/include/utils/errcodes.h","postgresql:REL7_4_8:src/include/utils/errcodes.h","postgresql:REL7_4_9:src/include/utils/errcodes.h","postgresql:REL8_0_0:src/include/utils/errcodes.h","postgresql:REL8_0_10:src/include/utils/errcodes.h","postgresql:REL8_0_11:src/include/utils/errcodes.h","postgresql:REL8_0_12:src/include/utils/errcodes.h","postgresql:REL8_0_13:src/include/utils/errcodes.h","postgresql:REL8_0_14:src/include/utils/errcodes.h","postgresql:REL8_0_15:src/include/utils/errcodes.h","postgresql:REL8_0_16:src/include/utils/errcodes.h","postgresql:REL8_0_17:src/include/utils/errcodes.h","postgresql:REL8_0_18:src/include/utils/errcodes.h","postgresql:REL8_0_19:src/include/utils/errcodes.h","postgresql:REL8_0_1:src/include/utils/errcodes.h","postgresql:REL8_0_20:src/include/utils/errcodes.h","postgresql:REL8_0_21:src/include/utils/errcodes.h","postgresql:REL8_0_22:src/include/utils/errcodes.h","postgresql:REL8_0_23:src/include/utils/errcodes.h","postgresql:REL8_0_24:src/include/utils/errcodes.h","postgresql:REL8_0_25:src/include/utils/errcodes.h","postgresql:REL8_0_26:src/include/utils/errcodes.h","postgresql:REL8_0_2:src/include/utils/errcodes.h","postgresql:REL8_0_3:src/include/utils/errcodes.h","postgresql:REL8_0_4:src/include/utils/errcodes.h","postgresql:REL8_0_5:src/include/utils/errcodes.h","postgresql:REL8_0_6:src/include/utils/errcodes.h","postgresql:REL8_0_7:src/include/utils/errcodes.h","postgresql:REL8_0_8:src/include/utils/errcodes.h","postgresql:REL8_0_9:src/include/utils/errcodes.h","postgresql:REL8_1_0:src/include/utils/errcodes.h","postgresql:REL8_1_10:src/include/utils/errcodes.h","postgresql:REL8_1_11:src/include/utils/errcodes.h","postgresql:REL8_1_12:src/include/utils/errcodes.h","postgresql:REL8_1_13:src/include/utils/errcodes.h","postgresql:REL8_1_14:src/include/utils/errcodes.h","postgresql:REL8_1_15:src/include/utils/errcodes.h","postgresql:REL8_1_16:src/include/utils/errcodes.h","postgresql:REL8_1_17:src/include/utils/errcodes.h","postgresql:REL8_1_18:src/include/utils/errcodes.h","postgresql:REL8_1_19:src/include/utils/errcodes.h","postgresql:REL8_1_1:src/include/utils/errcodes.h","postgresql:REL8_1_20:src/include/utils/errcodes.h","postgresql:REL8_1_21:src/include/utils/errcodes.h","postgresql:REL8_1_22:src/include/utils/errcodes.h","postgresql:REL8_1_23:src/include/utils/errcodes.h","postgresql:REL8_1_2:src/include/utils/errcodes.h","postgresql:REL8_1_3:src/include/utils/errcodes.h","postgresql:REL8_1_4:src/include/utils/errcodes.h","postgresql:REL8_1_5:src/include/utils/errcodes.h","postgresql:REL8_1_6:src/include/utils/errcodes.h","postgresql:REL8_1_7:src/include/utils/errcodes.h","postgresql:REL8_1_8:src/include/utils/errcodes.h","postgresql:REL8_1_9:src/include/utils/errcodes.h","postgresql:REL8_2_0:src/include/utils/errcodes.h","postgresql:REL8_2_10:src/include/utils/errcodes.h","postgresql:REL8_2_11:src/include/utils/errcodes.h","postgresql:REL8_2_12:src/include/utils/errcodes.h","postgresql:REL8_2_13:src/include/utils/errcodes.h","postgresql:REL8_2_14:src/include/utils/errcodes.h","postgresql:REL8_2_15:src/include/utils/errcodes.h","postgresql:REL8_2_16:src/include/utils/errcodes.h","postgresql:REL8_2_17:src/include/utils/errcodes.h","postgresql:REL8_2_18:src/include/utils/errcodes.h","postgresql:REL8_2_19:src/include/utils/errcodes.h","postgresql:REL8_2_1:src/include/utils/errcodes.h","postgresql:REL8_2_20:src/include/utils/errcodes.h","postgresql:REL8_2_21:src/include/utils/errcodes.h","postgresql:REL8_2_22:src/include/utils/errcodes.h","postgresql:REL8_2_23:src/include/utils/errcodes.h","postgresql:REL8_2_2:src/include/utils/errcodes.h","postgresql:REL8_2_3:src/include/utils/errcodes.h","postgresql:REL8_2_4:src/include/utils/errcodes.h","postgresql:REL8_2_5:src/include/utils/errcodes.h","postgresql:REL8_2_6:src/include/utils/errcodes.h","postgresql:REL8_2_7:src/include/utils/errcodes.h","postgresql:REL8_2_8:src/include/utils/errcodes.h","postgresql:REL8_2_9:src/include/utils/errcodes.h","postgresql:REL8_3_0:src/include/utils/errcodes.h","postgresql:REL8_3_10:src/include/utils/errcodes.h","postgresql:REL8_3_11:src/include/utils/errcodes.h","postgresql:REL8_3_12:src/include/utils/errcodes.h","postgresql:REL8_3_13:src/include/utils/errcodes.h","postgresql:REL8_3_14:src/include/utils/errcodes.h","postgresql:REL8_3_15:src/include/utils/errcodes.h","postgresql:REL8_3_16:src/include/utils/errcodes.h","postgresql:REL8_3_17:src/include/utils/errcodes.h","postgresql:REL8_3_18:src/include/utils/errcodes.h","postgresql:REL8_3_19:src/include/utils/errcodes.h","postgresql:REL8_3_1:src/include/utils/errcodes.h","postgresql:REL8_3_20:src/include/utils/errcodes.h","postgresql:REL8_3_21:src/include/utils/errcodes.h","postgresql:REL8_3_22:src/include/utils/errcodes.h","postgresql:REL8_3_23:src/include/utils/errcodes.h","postgresql:REL8_3_2:src/include/utils/errcodes.h","postgresql:REL8_3_3:src/include/utils/errcodes.h","postgresql:REL8_3_4:src/include/utils/errcodes.h","postgresql:REL8_3_5:src/include/utils/errcodes.h","postgresql:REL8_3_6:src/include/utils/errcodes.h","postgresql:REL8_3_7:src/include/utils/errcodes.h","postgresql:REL8_3_8:src/include/utils/errcodes.h","postgresql:REL8_3_9:src/include/utils/errcodes.h","postgresql:REL8_4_0:src/include/utils/errcodes.h","postgresql:REL8_4_10:src/include/utils/errcodes.h","postgresql:REL8_4_11:src/include/utils/errcodes.h","postgresql:REL8_4_12:src/include/utils/errcodes.h","postgresql:REL8_4_13:src/include/utils/errcodes.h","postgresql:REL8_4_14:src/include/utils/errcodes.h","postgresql:REL8_4_15:src/include/utils/errcodes.h","postgresql:REL8_4_16:src/include/utils/errcodes.h","postgresql:REL8_4_17:src/include/utils/errcodes.h","postgresql:REL8_4_18:src/include/utils/errcodes.h","postgresql:REL8_4_19:src/include/utils/errcodes.h","postgresql:REL8_4_1:src/include/utils/errcodes.h","postgresql:REL8_4_20:src/include/utils/errcodes.h","postgresql:REL8_4_21:src/include/utils/errcodes.h","postgresql:REL8_4_22:src/include/utils/errcodes.h","postgresql:REL8_4_2:src/include/utils/errcodes.h","postgresql:REL8_4_3:src/include/utils/errcodes.h","postgresql:REL8_4_4:src/include/utils/errcodes.h","postgresql:REL8_4_5:src/include/utils/errcodes.h","postgresql:REL8_4_6:src/include/utils/errcodes.h","postgresql:REL8_4_7:src/include/utils/errcodes.h","postgresql:REL8_4_8:src/include/utils/errcodes.h","postgresql:REL8_4_9:src/include/utils/errcodes.h"],"notes":"The old definition path and same-tag documentation were locked for the observed 7.4..8.4 tags; this is a definition presence bound, not a runtime path or precise introducing commit.","scope":"pre9-definition-history","status":"definition_only"}]},"Evidence":[{"Kind":"cases","Ordinal":0,"ID":"dml_unique_conflict","ServerVersion":null,"Status":null,"Payload":{"assertions":["SQLSTATE is 23505","Protocol diagnostics identify the schema, table, and constraint","A successful autocommit connection is IDLE after the error"],"case_id":"dml_unique_conflict","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":0,"preconditions":["A disposable database or schema","One NOT DEFERRABLE unique constraint"],"repair":"Choose a valid key or change the business operation; do not discard the collision implicitly.","trigger":"Insert a second row with the same email value.","versions":["10","18"]}},{"Kind":"cases","Ordinal":1,"ID":"explicit_tx_abort_recovery","ServerVersion":null,"Status":null,"Payload":{"assertions":["The failed transaction is INERROR","The next statement gets 25P02","ROLLBACK restores a usable connection"],"case_id":"explicit_tx_abort_recovery","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":1,"preconditions":["An explicit transaction","One unique constraint"],"repair":"ROLLBACK the transaction, then retry a deliberate valid operation.","trigger":"Cause 23505 after BEGIN, then issue a statement before rollback.","versions":["10","18"]}},{"Kind":"cases","Ordinal":2,"ID":"savepoint_recovery","ServerVersion":null,"Status":null,"Payload":{"assertions":["The failed subtransaction is INERROR","ROLLBACK TO SAVEPOINT restores INTRANS","The outer change and post-savepoint repair both commit"],"case_id":"savepoint_recovery","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":2,"preconditions":["An explicit transaction and SAVEPOINT","One unique constraint"],"repair":"ROLLBACK TO the savepoint and continue with a valid operation.","trigger":"Cause 23505 after a savepoint while an outer change is pending.","versions":["10","18"]}},{"Kind":"cases","Ordinal":3,"ID":"deferred_commit_conflict","ServerVersion":null,"Status":null,"Payload":{"assertions":["The inserts are accepted before COMMIT","COMMIT raises 23505","The failed top-level transaction returns to IDLE and its rows are rolled back"],"case_id":"deferred_commit_conflict","cleanup":"Drop the case schema with an owner connection.","has_snippet":false,"position":3,"preconditions":["A DEFERRABLE INITIALLY DEFERRED unique constraint","Two duplicate rows in one transaction"],"repair":"Make keys unique before COMMIT or roll back and retry the whole transaction.","trigger":"Insert both rows successfully and commit.","versions":["10","18"]}},{"Kind":"cases","Ordinal":4,"ID":"plpgsql_exception_recovery","ServerVersion":null,"Status":null,"Payload":{"assertions":["GET STACKED DIAGNOSTICS reports 23505","The surrounding call succeeds","The handler's repair row commits"],"case_id":"plpgsql_exception_recovery","cleanup":"Drop the function and case schema with an owner connection.","has_snippet":true,"position":4,"preconditions":["PL/pgSQL language","A function that catches unique_violation"],"repair":"Use a narrowly scoped EXCEPTION handler and verify which statement caused the violation.","trigger":"A natural duplicate insert inside the function.","versions":["10","18"]}},{"Kind":"cases","Ordinal":5,"ID":"concurrent_unique_conflict","ServerVersion":null,"Status":null,"Payload":{"assertions":["B is observed waiting on a lock before A commits","B receives 23505 after A commits","B is INERROR until rollback and exactly one row remains"],"case_id":"concurrent_unique_conflict","cleanup":"Roll back both workers if needed, then drop the case schema.","has_snippet":false,"position":5,"preconditions":["Two sessions","A unique index","An observer session reading pg_stat_activity"],"repair":"Coordinate key allocation or retry the complete transaction when the business operation is retryable.","trigger":"Session A holds an uncommitted key while session B inserts the same key.","versions":["10","18"]}},{"Kind":"cases","Ordinal":6,"ID":"on_conflict_target_scope","ServerVersion":null,"Status":null,"Payload":{"assertions":["The targeted email clause does not suppress a phone collision","An omitted-target DO NOTHING handles a usable unique conflict","The result is checked against the intended business policy"],"case_id":"on_conflict_target_scope","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":6,"preconditions":["Separate unique email and phone constraints","A pre-existing phone value"],"repair":"Select the conflict target and DO UPDATE/DO NOTHING policy to match the business invariant; reconcile idempotency requests with the original request and result.","trigger":"Use ON CONFLICT (email) for a row that collides only on phone.","versions":["10","18"]}},{"Kind":"cases","Ordinal":7,"ID":"nulls_not_distinct","ServerVersion":null,"Status":null,"Payload":{"assertions":["The second NULL raises 23505","The diagnostic identifies the explicit constraint","The behavior is not attributed to an upgrade changing the old default"],"case_id":"nulls_not_distinct","cleanup":"Drop the case schema with an owner connection.","has_snippet":false,"position":7,"preconditions":["PostgreSQL 15 or later","UNIQUE NULLS NOT DISTINCT is explicitly declared"],"repair":"Choose NULLS DISTINCT (the default) or NULLS NOT DISTINCT deliberately for the invariant.","trigger":"Insert a second NULL into the explicit NULLS NOT DISTINCT constraint.","versions":["15","16","17","18"]}},{"Kind":"cases","Ordinal":8,"ID":"nulls_not_distinct_version_boundary","ServerVersion":null,"Status":null,"Payload":{"assertions":["Ordinary UNIQUE accepts two NULLs on both targets","PG14 records the actual unsupported syntax diagnostic","PG15 records a natural 23505 for the explicit second NULL and a valid repair"],"case_id":"nulls_not_distinct_version_boundary","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":8,"preconditions":["A disposable PostgreSQL 14 or 15 target","One ordinary UNIQUE and one explicit UNIQUE NULLS NOT DISTINCT declaration"],"repair":"Use the explicit NULL policy deliberately; after the supported duplicate, insert a valid non-duplicate value and verify the connection remains usable.","trigger":"Insert two NULLs under ordinary UNIQUE, then execute the explicit NULLS NOT DISTINCT declaration and, where supported, a second NULL.","versions":["14","15"]}},{"Kind":"cases","Ordinal":9,"ID":"sequence_lag_repair","ServerVersion":null,"Status":null,"Payload":{"assertions":["The stale nextval causes a real 23505","setval(max(id), true) moves the next value to 107 in this controlled case","The result records sequence identity and non-default increment"],"case_id":"sequence_lag_repair","cleanup":"Drop the case schema with an owner connection.","has_snippet":true,"position":9,"preconditions":["A controlled, quiesced case schema","A sequence with START 100 and INCREMENT 7"],"repair":"Inspect the sequence and table, then repair only under a controlled writer-free window; handle an empty table and non-default bounds/increment separately.","trigger":"Insert an explicit key equal to the sequence's first value, then call nextval.","versions":["10","18"]}},{"Kind":"cases","Ordinal":10,"ID":"index_build_conflict","ServerVersion":null,"Status":null,"Payload":{"assertions":["Both failures are 23505 with the index-build message template","The regular build leaves no index","The concurrent failure's actual pg_index state is recorded and is not generalized to every CIC failure"],"case_id":"index_build_conflict","cleanup":"Drop any leftover indexes and the case schema with an owner connection.","has_snippet":false,"position":10,"preconditions":["Duplicate table rows","Owner connection for index cleanup"],"repair":"Resolve duplicates, drop an invalid concurrent index when present, and retry the appropriate build.","trigger":"Build a regular unique index and then a concurrent unique index over duplicate rows.","versions":["10","18"]}},{"Kind":"cases","Ordinal":11,"ID":"diagnostic_visibility","ServerVersion":null,"Status":null,"Payload":{"assertions":["SQLSTATE and protocol object fields remain available","The key detail can be omitted when the role cannot inspect the key columns"],"case_id":"diagnostic_visibility","cleanup":"Drop the role, table, and schema with an owner connection.","has_snippet":false,"position":11,"preconditions":["A restricted login role with INSERT but no SELECT privilege","A seeded unique row"],"repair":"Use permitted diagnostics and server logs; do not assume detail is always present.","trigger":"The restricted role inserts a duplicate key.","versions":["10","18"]}},{"Kind":"cases","Ordinal":12,"ID":"log_fields","ServerVersion":null,"Status":null,"Payload":{"assertions":["CSV/JSON log records expose SQLSTATE, message, and detail","The protocol constraint_name is not treated as a CSV/JSON standard key","The exact emitted record is tied to this run"],"case_id":"log_fields","cleanup":"Stop and remove only the runner-owned cluster or container.","has_snippet":false,"position":12,"preconditions":["A dedicated cluster with logging_collector and csvlog; jsonlog when supported"],"repair":"Correlate logs with SQLSTATE and message fields; obtain object identity from the ErrorResponse or structured server context where available.","trigger":"Cause a duplicate-key error and read the collector output.","versions":["10","18"]}},{"Kind":"claims","Ordinal":0,"ID":"identity.class-and-condition","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":0,"runtime":[],"sources":["src.errcodes.18.6"],"statement":"23505 is the unique_violation condition in Class 23 integrity_constraint_violation."}},{"Kind":"claims","Ordinal":1,"ID":"runtime.dml-template","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":1,"runtime":[],"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."}},{"Kind":"claims","Ordinal":2,"ID":"runtime.protocol-fields","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":2,"runtime":[],"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."}},{"Kind":"claims","Ordinal":3,"ID":"runtime.index-build-template","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":3,"runtime":[],"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."}},{"Kind":"claims","Ordinal":4,"ID":"runtime.logical-apply-sqlstate","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":4,"runtime":[],"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."}},{"Kind":"claims","Ordinal":5,"ID":"runtime.tx-contexts","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":5,"runtime":[],"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."}},{"Kind":"claims","Ordinal":6,"ID":"runtime.retry-boundary","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":6,"runtime":[],"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."}},{"Kind":"claims","Ordinal":7,"ID":"runtime.on-conflict-scope","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":7,"runtime":[],"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."}},{"Kind":"claims","Ordinal":8,"ID":"runtime.sequence-repair-limit","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":8,"runtime":[],"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."}},{"Kind":"claims","Ordinal":9,"ID":"runtime.nulls-choice","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":9,"runtime":[],"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."}},{"Kind":"claims","Ordinal":10,"ID":"runtime.detail-visibility","ServerVersion":null,"Status":null,"Payload":{"claim_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.","position":10,"runtime":[],"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."}},{"Kind":"claims","Ordinal":11,"ID":"runtime.version-boundary","ServerVersion":null,"Status":null,"Payload":{"claim_id":"runtime.version-boundary","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.","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.","position":11,"runtime":[],"sources":["doc.insert.18.6","runtime.23505-boundary-pg14-20260909.pg14","runtime.23505-boundary-pg15-20260909.pg15"],"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."}},{"Kind":"messages","Ordinal":0,"ID":"message.dml.nbtree","ServerVersion":null,"Status":null,"Payload":{"limits":"Template values and DETAIL depend on relation name and diagnostic visibility.","message_id":"message.dml.nbtree","path":"","position":0,"raw":{"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"},"severity":"E","sources":["src.nbtinsert.18.6"],"templates":[{"kind":"primary","literal":"duplicate key value violates unique constraint \" \"","position":0,"role":"","template":"duplicate key value violates unique constraint \"%s\""},{"kind":"detail","literal":"Key already exists.","position":1,"role":"","template":"Key %s already exists."}]}},{"Kind":"messages","Ordinal":1,"ID":"message.index-build","ServerVersion":null,"Status":null,"Payload":{"limits":"This is the unique-index build path, not the ordinary DML template.","message_id":"message.index-build","path":"","position":1,"raw":{"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"},"severity":"E","sources":["src.tuplesortvariants.18.6"],"templates":[{"kind":"primary","literal":"could not create unique index \" \"","position":0,"role":"","template":"could not create unique index \"%s\""},{"kind":"detail","literal":"Key is duplicated.","position":1,"role":"","template":"Key %s is duplicated."}]}},{"Kind":"messages","Ordinal":2,"ID":"message.logical-apply","ServerVersion":null,"Status":null,"Payload":{"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.","message_id":"message.logical-apply","path":"","position":2,"raw":{"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"},"severity":"","sources":["src.logical-conflict.18.6"],"templates":[{"kind":"primary","literal":"conflict detected on relation \" . \": conflict=","position":0,"role":"","template":"conflict detected on relation \"%s.%s\": conflict=%s"},{"kind":"detail","literal":"","position":1,"role":"","template":"%s"}]}},{"Kind":"runtimes","Ordinal":0,"ID":"runtime.23505-final-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["deferred_commit_conflict","concurrent_unique_conflict","nulls_not_distinct","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.","position":0,"raw":{"cases":["deferred_commit_conflict","concurrent_unique_conflict","nulls_not_distinct","index_build_conflict","diagnostic_visibility"],"id":"runtime.23505-final-20260909.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.","raw":"verify/results/23505-final-20260909/latest/raw.jsonl","run_id":"23505-final-20260909","selection_status":"selected_for_unreplaced_cases","server_version":"18.6 (Homebrew)","server_version_num":180006,"status":"passed","summary":"verify/results/23505-final-20260909/latest/summary.json","target":"latest"},"run_id":"23505-final-20260909","runtime_id":"runtime.23505-final-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":1,"ID":"runtime.23505-final-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"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.","position":1,"raw":{"cases":["deferred_commit_conflict","concurrent_unique_conflict","index_build_conflict","diagnostic_visibility"],"cases_not_applicable":["nulls_not_distinct"],"cases_passed":11,"id":"runtime.23505-final-20260909.pg10","image":"postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc","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.","raw":"verify/results/23505-final-20260909/pg10/raw.jsonl","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","summary":"verify/results/23505-final-20260909/pg10/summary.json","target":"pg10"},"run_id":"23505-final-20260909","runtime_id":"runtime.23505-final-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":2,"ID":"runtime.23505-snippet-contract-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["plpgsql_exception_recovery","on_conflict_target_scope","sequence_lag_repair"],"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.","position":2,"raw":{"cases":["plpgsql_exception_recovery","on_conflict_target_scope","sequence_lag_repair"],"id":"runtime.23505-snippet-contract-20260909.latest","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.","raw":"verify/results/23505-snippet-contract-20260909/latest/raw.jsonl","run_id":"23505-snippet-contract-20260909","selection_status":"selected_for_registry_snippets","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":"verify/cases/23505/snippets.json","status":"passed","summary":"verify/results/23505-snippet-contract-20260909/latest/summary.json","target":"latest"},"run_id":"23505-snippet-contract-20260909","runtime_id":"runtime.23505-snippet-contract-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":3,"ID":"runtime.23505-snippet-contract-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["plpgsql_exception_recovery","on_conflict_target_scope","sequence_lag_repair"],"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.","position":3,"raw":{"cases":["plpgsql_exception_recovery","on_conflict_target_scope","sequence_lag_repair"],"id":"runtime.23505-snippet-contract-20260909.pg10","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.","raw":"verify/results/23505-snippet-contract-20260909/pg10/raw.jsonl","run_id":"23505-snippet-contract-20260909","selection_status":"selected_for_registry_snippets","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":"verify/cases/23505/snippets.json","status":"passed","summary":"verify/results/23505-snippet-contract-20260909/pg10/summary.json","target":"pg10"},"run_id":"23505-snippet-contract-20260909","runtime_id":"runtime.23505-snippet-contract-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":4,"ID":"runtime.23505-log-fields-final-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["log_fields"],"limits":"This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger.","position":4,"raw":{"cases":["log_fields"],"id":"runtime.23505-log-fields-final-20260909.latest","limits":"This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger.","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":"verify/results/23505-log-fields-final-20260909/latest/raw.jsonl","raw_sha256":"91945d2220cb85882275675810fb9b85382e99a6b25b2e81e6d06e7751b8553f","run_id":"23505-log-fields-final-20260909","selection_status":"selected_exact_log_correlation","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-log-fields-final-20260909/latest/summary.json","summary_sha256":"4f398c31188efa509cc59f010e4cbac23751a48deac973a027ecb66903c8c817","target":"latest"},"run_id":"23505-log-fields-final-20260909","runtime_id":"runtime.23505-log-fields-final-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":5,"ID":"runtime.23505-log-fields-final-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["log_fields"],"limits":"This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger.","position":5,"raw":{"cases":["log_fields"],"id":"runtime.23505-log-fields-final-20260909.pg10","image":"postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc","limits":"This targeted run is the sole selected log_fields record; its backend PID, schema, table, constraint, message, and detail match the trigger.","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":"verify/results/23505-log-fields-final-20260909/pg10/raw.jsonl","raw_sha256":"fc52475937c24be583212464ff74a70603118680f5d39b7e2938118473223711","run_id":"23505-log-fields-final-20260909","selection_status":"selected_exact_log_correlation","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-log-fields-final-20260909/pg10/summary.json","summary_sha256":"d24ef7ce7c8a40cba28b0b5952b404df6feee8038a9e531062885a852b3f77e9","target":"pg10"},"run_id":"23505-log-fields-final-20260909","runtime_id":"runtime.23505-log-fields-final-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":6,"ID":"runtime.23505-diagnostic-snippet-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["dml_unique_conflict"],"limits":"The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data.","position":6,"raw":{"cases":["dml_unique_conflict"],"id":"runtime.23505-diagnostic-snippet-20260909.latest","limits":"The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data.","raw":"verify/results/23505-diagnostic-snippet-20260909/latest/raw.jsonl","run_id":"23505-diagnostic-snippet-20260909","selection_status":"selected_for_dml_diagnostic","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":"verify/cases/23505/snippets.json","status":"passed","summary":"verify/results/23505-diagnostic-snippet-20260909/latest/summary.json","target":"latest"},"run_id":"23505-diagnostic-snippet-20260909","runtime_id":"runtime.23505-diagnostic-snippet-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":7,"ID":"runtime.23505-diagnostic-snippet-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["dml_unique_conflict"],"limits":"The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data.","position":7,"raw":{"cases":["dml_unique_conflict"],"id":"runtime.23505-diagnostic-snippet-20260909.pg10","limits":"The selected DML diagnostic case is the targeted registry run; the broad base-run copy is retained only as local audit data.","raw":"verify/results/23505-diagnostic-snippet-20260909/pg10/raw.jsonl","run_id":"23505-diagnostic-snippet-20260909","selection_status":"selected_for_dml_diagnostic","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":"verify/cases/23505/snippets.json","status":"passed","summary":"verify/results/23505-diagnostic-snippet-20260909/pg10/summary.json","target":"pg10"},"run_id":"23505-diagnostic-snippet-20260909","runtime_id":"runtime.23505-diagnostic-snippet-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":8,"ID":"runtime.23505-explicit-manual-final-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["explicit_tx_abort_recovery"],"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.","position":8,"raw":{"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":"verify/results/23505-explicit-manual-final-20260909/latest/raw.jsonl","raw_sha256":"586bacd10d1e5d2a5a5ec58c2ed747d4b2b8618a051ce56b0d8307c7265e196d","run_id":"23505-explicit-manual-final-20260909","selection_status":"selected_manual_boundary","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-explicit-manual-final-20260909/latest/summary.json","summary_sha256":"38cd0161a97fa35084f192a5aa60f6061955b60ec681c4800b575514dee6a6f3","target":"latest"},"run_id":"23505-explicit-manual-final-20260909","runtime_id":"runtime.23505-explicit-manual-final-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":9,"ID":"runtime.23505-explicit-manual-final-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["explicit_tx_abort_recovery"],"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.","position":9,"raw":{"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":"verify/results/23505-explicit-manual-final-20260909/pg10/raw.jsonl","raw_sha256":"ed1c4f5082a00b67297a9d01b8362f7d70c758a2fbd393e20def6c450a6f5739","run_id":"23505-explicit-manual-final-20260909","selection_status":"selected_manual_boundary","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-explicit-manual-final-20260909/pg10/summary.json","summary_sha256":"4a4243d367afd9c142991aba496336c972e4fe3cc959a724d3454773986ac30b","target":"pg10"},"run_id":"23505-explicit-manual-final-20260909","runtime_id":"runtime.23505-explicit-manual-final-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":10,"ID":"runtime.23505-savepoint-manual-final-20260909.latest","ServerVersion":"18.6 (Homebrew)","Status":"passed","Payload":{"cases":["savepoint_recovery"],"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.","position":10,"raw":{"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,"rows":[[1,"seed"],[2,"outer"],[3,"after savepoint"]],"statuses":{"after_duplicate":"INERROR","after_rollback_to_savepoint":"INTRANS"},"transaction_control":["BEGIN","SAVEPOINT","ROLLBACK TO SAVEPOINT","RELEASE SAVEPOINT","COMMIT"]},"raw":"verify/results/23505-savepoint-manual-final-20260909/latest/raw.jsonl","raw_sha256":"3b3e7305df8d70309f3c632e9b19b43cd9f1411f0967e952bff7997e5c0c7cb7","run_id":"23505-savepoint-manual-final-20260909","selection_status":"selected_manual_boundary","server_version":"18.6 (Homebrew)","server_version_num":180006,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-savepoint-manual-final-20260909/latest/summary.json","summary_sha256":"e9ff818a677f577321fb2faccb8d48bb62b054d9f579531a5231029cb16162ef","target":"latest"},"run_id":"23505-savepoint-manual-final-20260909","runtime_id":"runtime.23505-savepoint-manual-final-20260909.latest","server_version":"18.6 (Homebrew)","status":"passed","target":"latest"}},{"Kind":"runtimes","Ordinal":11,"ID":"runtime.23505-savepoint-manual-final-20260909.pg10","ServerVersion":"10.21 (Debian 10.21-1.pgdg90+1)","Status":"passed","Payload":{"cases":["savepoint_recovery"],"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.","position":11,"raw":{"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,"rows":[[1,"seed"],[2,"outer"],[3,"after savepoint"]],"statuses":{"after_duplicate":"INERROR","after_rollback_to_savepoint":"INTRANS"},"transaction_control":["BEGIN","SAVEPOINT","ROLLBACK TO SAVEPOINT","RELEASE SAVEPOINT","COMMIT"]},"raw":"verify/results/23505-savepoint-manual-final-20260909/pg10/raw.jsonl","raw_sha256":"74fb5d36973e351dead8e49c02f2e272979c0dae5d40fc6b631a9ea6f25c5742","run_id":"23505-savepoint-manual-final-20260909","selection_status":"selected_manual_boundary","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","server_version_num":100021,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"74d7d700331bc3d9c190bf807cca31999ddf45e8cbea153ec7c6b6d4f9702686"},"status":"passed","summary":"verify/results/23505-savepoint-manual-final-20260909/pg10/summary.json","summary_sha256":"9f6dea66d73191045e35fe239ecff2c69fb046bdd90de5cc4351443f3bc0f4bf","target":"pg10"},"run_id":"23505-savepoint-manual-final-20260909","runtime_id":"runtime.23505-savepoint-manual-final-20260909.pg10","server_version":"10.21 (Debian 10.21-1.pgdg90+1)","status":"passed","target":"pg10"}},{"Kind":"runtimes","Ordinal":12,"ID":"runtime.23505-boundary-pg14-20260909.pg14","ServerVersion":"14.24 (Debian 14.24-1.pgdg13+2)","Status":"not_applicable","Payload":{"cases":["nulls_not_distinct_version_boundary"],"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.","position":12,"raw":{"case_manifest":{"path":"verify/cases/23505/cases.json","sha256":"e4d9376fa038675dcfd83c3fb3590b2bc43bb897dd5521be11474a7df0334776"},"case_status":"passed","cases":["nulls_not_distinct_version_boundary"],"id":"runtime.23505-boundary-pg14-20260909.pg14","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.","observed":{"explicit_feature":"unsupported_syntax","natural_23505_observed":false,"ordinary_unique_null_count":2,"status_after_syntax":"IDLE","unsupported_primary":"syntax error at or near \"NULLS\"","unsupported_severity":"ERROR","unsupported_sqlstate":"42601"},"raw":"verify/results/23505-boundary-pg14-20260909/pg14/raw.jsonl","raw_sha256":"d21fcb5f18c65a8e941814b8c4046b84700c59ce14b73ced51d2f8ac574552fc","run_id":"23505-boundary-pg14-20260909","selection_status":"selected_boundary_comparison","server_version":"14.24 (Debian 14.24-1.pgdg13+2)","server_version_num":140024,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"2535a5a74138b3e7896f1d06e1109be42f62a49b4dac25e3f842d60c30b21a95"},"status":"not_applicable","summary":"verify/results/23505-boundary-pg14-20260909/pg14/summary.json","summary_sha256":"e757ffaea0ee44d8f5ee5f4187798809d0c63a40020ff575a763e4cabb960f75","target":"pg14","target_status":"passed"},"run_id":"23505-boundary-pg14-20260909","runtime_id":"runtime.23505-boundary-pg14-20260909.pg14","server_version":"14.24 (Debian 14.24-1.pgdg13+2)","status":"not_applicable","target":"pg14"}},{"Kind":"runtimes","Ordinal":13,"ID":"runtime.23505-boundary-pg15-20260909.pg15","ServerVersion":"15.19 (Debian 15.19-1.pgdg13+2)","Status":"passed","Payload":{"cases":["nulls_not_distinct_version_boundary"],"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.","position":13,"raw":{"case_manifest":{"path":"verify/cases/23505/cases.json","sha256":"e4d9376fa038675dcfd83c3fb3590b2bc43bb897dd5521be11474a7df0334776"},"case_status":"passed","cases":["nulls_not_distinct_version_boundary"],"id":"runtime.23505-boundary-pg15-20260909.pg15","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.","observed":{"explicit_constraint":"nulls_not_distinct_uq","explicit_detail":"Key (external_id)=(null) already exists.","explicit_feature":"supported","explicit_primary":"duplicate key value violates unique constraint \"nulls_not_distinct_uq\"","explicit_severity":"ERROR","explicit_sqlstate":"23505","natural_23505_observed":true,"ordinary_unique_null_count":2,"repaired_row_count":2,"status_after_duplicate":"IDLE"},"raw":"verify/results/23505-boundary-pg15-20260909/pg15/raw.jsonl","raw_sha256":"d2bd7a499b4c9355f209e0831b3dbba8bcc98c8149010dcc9f13135ae05ed97a","run_id":"23505-boundary-pg15-20260909","selection_status":"selected_boundary_comparison","server_version":"15.19 (Debian 15.19-1.pgdg13+2)","server_version_num":150019,"snippet_registry":{"path":"verify/cases/23505/snippets.json","sha256":"2535a5a74138b3e7896f1d06e1109be42f62a49b4dac25e3f842d60c30b21a95"},"status":"passed","summary":"verify/results/23505-boundary-pg15-20260909/pg15/summary.json","summary_sha256":"df4d1f90eaca2155359bc7b141734a1026d7e1893400e5e6352ac1e95461137d","target":"pg15","target_status":"passed"},"run_id":"23505-boundary-pg15-20260909","runtime_id":"runtime.23505-boundary-pg15-20260909.pg15","server_version":"15.19 (Debian 15.19-1.pgdg13+2)","status":"passed","target":"pg15"}},{"Kind":"sources","Ordinal":0,"ID":"src.errcodes.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 235-241","path":"src/backend/utils/errcodes.txt","position":0,"sha256":"6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","source_id":"src.errcodes.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"}},{"Kind":"sources","Ordinal":1,"ID":"src.nbtinsert.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 640-674","path":"src/backend/access/nbtree/nbtinsert.c","position":1,"sha256":"199671bec6b07b80100ea41632cef4b03a9525df75a2ede2b8fe155b637dcba7","source_id":"src.nbtinsert.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtinsert.c#L640-L674"}},{"Kind":"sources","Ordinal":2,"ID":"src.genam.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 155-275","path":"src/backend/access/index/genam.c","position":2,"sha256":"11897b1d8b1ae1f4a1bef9a72e740da7aa83579abf84e4ca5ebacd6530874c28","source_id":"src.genam.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/index/genam.c#L155-L275"}},{"Kind":"sources","Ordinal":3,"ID":"src.tuplesortvariants.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 1670-1694","path":"src/backend/utils/sort/tuplesortvariants.c","position":3,"sha256":"f160e11ec100be7e05db8abba7587e8fd0e092110d56f917d2d4dac0a58261ca","source_id":"src.tuplesortvariants.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/sort/tuplesortvariants.c#L1670-L1694"}},{"Kind":"sources","Ordinal":4,"ID":"src.logical-conflict.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 102-131, 168-180","path":"src/backend/replication/logical/conflict.c","position":4,"sha256":"1dc6959872c84bc0d0b402ab48c4050dd961185574971633bd698eadc1a56347","source_id":"src.logical-conflict.18.6","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/replication/logical/conflict.c#L102-L180"}},{"Kind":"sources","Ordinal":5,"ID":"doc.insert.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 363-430, 564-577","path":"doc/src/sgml/ref/insert.sgml","position":5,"sha256":"f93403779fb1d980cd5995a1e2741bbdae8404584407610f9aba33ec4724a39f","source_id":"doc.insert.18.6","tag":"REL_18_6","url":"https://www.postgresql.org/docs/18/sql-insert.html"}},{"Kind":"sources","Ordinal":6,"ID":"doc.create-index.18.6","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"lines 620-683","path":"doc/src/sgml/ref/create_index.sgml","position":6,"sha256":"3698f11c6f447d127e4624a1a845dee4d5146b8337ddc6d895a7962e676717f8","source_id":"doc.create-index.18.6","tag":"REL_18_6","url":"https://www.postgresql.org/docs/18/sql-createindex.html"}},{"Kind":"sources","Ordinal":7,"ID":"doc.protocol.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"ErrorResponse field reference","path":"doc/src/sgml/protocol.sgml","position":7,"sha256":"2531c535a61c7d3bb15ea328aa249317a3d2cf069f5d0d945dce428af845ddfc","source_id":"doc.protocol.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/protocol-error-fields.html"}},{"Kind":"sources","Ordinal":8,"ID":"doc.logging.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"CSV and JSON logging fields","path":"doc/src/sgml/config.sgml","position":8,"sha256":"19c5d1126df83008f073ef52fcb45caf8ec511c6ac1ae231def833ea1711d0c9","source_id":"doc.logging.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/runtime-config-logging.html"}},{"Kind":"sources","Ordinal":9,"ID":"doc.mvcc.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"serialization and deadlock failure handling","path":"doc/src/sgml/mvcc.sgml","position":9,"sha256":"4b7bf77ee0af4b86052330ff2421d567df3604b75fe7d4f522bec84fdea87340","source_id":"doc.mvcc.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/mvcc-serialization-failure-handling.html"}},{"Kind":"sources","Ordinal":10,"ID":"doc.plpgsql.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"EXCEPTION blocks and upsert example","path":"doc/src/sgml/plpgsql.sgml","position":10,"sha256":"43d705adbded343336341fd3e34ea8940432e8a8211f737d36ba3041ad0a4a51","source_id":"doc.plpgsql.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/plpgsql-control-structures.html"}},{"Kind":"sources","Ordinal":11,"ID":"doc.sequence.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"setval(regclass,bigint[,boolean])","path":"doc/src/sgml/func.sgml","position":11,"sha256":"05d03f505dc3c3b4fb2b3a6e8ed3275c425306a8ff20dd9548e838c26bbb968a","source_id":"doc.sequence.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/functions-sequence.html"}},{"Kind":"sources","Ordinal":12,"ID":"doc.transactions.18","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"","location":"savepoint and transaction recovery","path":"doc/src/sgml/xact.sgml","position":12,"sha256":"b48fbe8bd02ce3d1181a350c88c8baa6e11c73edc90a936e77b180daef328c5c","source_id":"doc.transactions.18","tag":"PG18-docs","url":"https://www.postgresql.org/docs/18/tutorial-transactions.html"}}]}
