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
INSERT 0 1
INSERT 0 1
CREATE FUNCTION
t_id | col1 | col2 | col3 |
---|---|---|---|
1 | foo1 | bar1 | baz1 |
2 | foo2 | bar2 | baz2 |
SELECT 2
f_clone_row |
---|
3 |
SELECT 1
t_id | col1 | col2 | col3 |
---|---|---|---|
1 | foo1 | bar1 | baz1 |
2 | foo2 | bar2 | baz2 |
3 | foo_new | bar_new | baz1 |
SELECT 3