DO $$ declare v_rec record; BEGIN for v_rec in SELECT * FROM pg_statistic loop raise notice 'Parameter is: %', v_rec.ctid; raise notice 'Parameter is: %', v_rec; end loop; END; $$ LANGUAGE plpgsql; NOTICE: 00000: Parameter is: (46,9) ERROR: XX000: missing chunk number 0 for toast value 30982 in pg_toast_2619 CONTEXT: PL/pgSQL function inline_code_block line 7 at RAISE