By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
| seqnr | defn_id | attr_id | input |
|---|---|---|---|
| 1 | 100 | 100 | test1 |
| 2 | 100 | 100 | test2 |
| 3 | 100 | 100 | test3 |
| 4 | 100 | 100 | test4 |
INSERT 0 4
ERROR: duplicate key value violates unique constraint "pk_id" DETAIL: Key (defn_id, attr_id, seqnr)=(100, 100, 2) already exists.
ALTER TABLE
UPDATE 4
| seqnr | defn_id | attr_id | input |
|---|---|---|---|
| 2 | 100 | 100 | test1 |
| 3 | 100 | 100 | test2 |
| 4 | 100 | 100 | test3 |
| 5 | 100 | 100 | test4 |
SELECT 4
ALTER TABLE
UPDATE 4
| seqnr | defn_id | attr_id | input |
|---|---|---|---|
| 3 | 100 | 100 | test1 |
| 4 | 100 | 100 | test2 |
| 5 | 100 | 100 | test3 |
| 6 | 100 | 100 | test4 |
SELECT 4