Hello I thing so Agg node doesn't set width well:
postgres=# explain select a,b from twocol; QUERY PLAN ---------------------------------------------------------- Seq Scan on twocol (cost=0.00..31.40 rows=2140 width=8) (1 row) postgres=# explain select sum(a) from twocol group by b; QUERY PLAN ---------------------------------------------------------------- HashAggregate (cost=42.10..44.60 rows=200 width=8) --< wrong should be 4 -> Seq Scan on twocol (cost=0.00..31.40 rows=2140 width=8) (2 rows) Agg get width directly from outer plan, what could be wrong. Regards Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers