add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
14 rows affected
ERROR:  The column c111  already  with b11
CONTEXT:  PL/pgSQL function check_insert() line 4 at RAISE

ERROR:  The column b21  already  has already a column
CONTEXT:  PL/pgSQL function check_insert() line 6 at RAISE

ERROR:  The column b11  already  has already a column
CONTEXT:  PL/pgSQL function check_insert() line 6 at RAISE

pk a b c
p1 a1 b11 c111
p2 a1 b11 c112
p3 a1 b12 c121
p4 a1 b12 c122
p5 a2 b21 c211
p6 a2 b21 c212
p7 a2 b22 c221
p8 a2 b22 c222
p9 null b31 c311
p10 a3 null c312
p11 a3 b31 null
p12 null null c314
p13 null b31 null
p14 a3 null null