pk-errmsg.patch
text/x-patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/access/nbtree/nbtinsert.c | 5 | 2 |
Index: src/backend/access/nbtree/nbtinsert.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v
retrieving revision 1.176
diff -u -3 -p -r1.176 nbtinsert.c
--- src/backend/access/nbtree/nbtinsert.c 2 Jan 2010 16:57:35 -0000 1.176
+++ src/backend/access/nbtree/nbtinsert.c 20 Jan 2010 22:56:55 -0000
@@ -381,8 +381,11 @@ _bt_check_unique(Relation rel, IndexTupl
values, isnull);
ereport(ERROR,
(errcode(ERRCODE_UNIQUE_VIOLATION),
- errmsg("duplicate key value violates unique constraint \"%s\"",
- RelationGetRelationName(rel)),
+ (rel->rd_index->indisprimary
+ ? errmsg("duplicate key value violates primary key \"%s\"",
+ RelationGetRelationName(rel))
+ : errmsg("duplicate key value violates unique constraint \"%s\"",
+ RelationGetRelationName(rel))),
errdetail("Key %s already exists.",
BuildIndexValueDescription(rel,
values, isnull))));