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 test (
col1 INT,
"Col1" INT
);
INSERT INTO test (col1) VALUES (1);
1 rows affected
INSERT INTO test ("col1") VALUES (2);
1 rows affected
INSERT INTO test (Col1) VALUES (3);
1 rows affected
INSERT INTO test ("Col1") VALUES (4);
1 rows affected
SELECT * FROM test;
col1 | Col1 |
---|---|
1 | null |
2 | null |
3 | null |
null | 4 |