By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
| a | b | c |
|---|---|---|
| 1 | 2 | 22 |
| 1 | 2 | 22 |
| 1 | 2 | 22 |
| 1 | 3 | 34 |
| 2 | 3 | 26 |
| 2 | 3 | 26 |
INSERT 0 6
CREATE FUNCTION
CREATE TRIGGER
ERROR: New values in c for the same a and b combination. CONTEXT: PL/pgSQL function check_conditional_unique() line 8 at RAISE
ERROR: New values in c for the same a and b combination. CONTEXT: PL/pgSQL function check_conditional_unique() line 8 at RAISE
ERROR: Duplicate values in c for different a and b combination. CONTEXT: PL/pgSQL function check_conditional_unique() line 15 at RAISE