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?.
CREATE TABLE
CREATE TABLE
a b c
2 3 26
1 3 34
1 2 22
INSERT 0 3
pkey a b c
1 1 2 22
2 1 2 22
3 1 2 22
4 1 3 34
5 2 3 26
6 2 3 26
INSERT 0 6
ERROR:  duplicate key value violates unique constraint "available_combinations_a_b_key"
DETAIL:  Key (a, b)=(1, 2) already exists.
ERROR:  duplicate key value violates unique constraint "available_combinations_c_key"
DETAIL:  Key (c)=(34) already exists.
ERROR:  duplicate key value violates unique constraint "available_combinations_c_key"
DETAIL:  Key (c)=(22) already exists.
INSERT 0 4
a b c
2 3 26
1 3 34
1 2 22
7 8 33
7 9 35
8 7 36
8 8 37
SELECT 7
INSERT 0 10
pkey a b c
1 1 2 22
2 1 2 22
3 1 2 22
4 1 3 34
5 2 3 26
6 2 3 26
7 7 8 33
8 7 8 33
9 7 9 35
10 7 9 35
11 7 9 35
12 7 9 35
13 8 7 36
14 8 7 36
15 8 8 37
16 8 8 37
SELECT 16