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?.
COPY 1
CREATE TABLE
BEGIN
COPY 1
a | b | c | d |
---|---|---|---|
a1 | b1 | c1 | 1 |
SELECT 1
ROLLBACK
BEGIN
COPY 1
a | b | c | d |
---|---|---|---|
a2 | b2 | c2 | null |
SELECT 1
ROLLBACK
DO
a | b | c | d |
---|---|---|---|
a1 | b1 | c1 | 1 |
a2 | b2 | c2 | null |
SELECT 2