By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| version |
|---|
| PostgreSQL 10.21 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit |
3 rows affected
2 rows affected
| a |
|---|
| 1 |
| 2 |
| 3 |
| b | c |
|---|---|
| 45 | 2 |
| 76 | 3 |
ERROR: insert or update on table "y" violates foreign key constraint "y_x_fk_c"
DETAIL: Key (c)=(7) is not present in table "x".