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 t1 as select 1 as i, 2 as x;
create table t2 as select 5 as i, 2 as x, 3 as y;

create function f() returns table (ct1 t1, ct2 t2) language sql as $$
select t1, t2 from t1 join t2 on t1.x = t2.x
$$;
CREATE FUNCTION
select *, (ct1).*, (ct2).*, (ct2).i from f();
ct1 ct2 i x i x y i
(1,2) (5,2,3) 1 2 5 2 3 5
SELECT 1