David Rowley <david.row...@2ndquadrant.com> writes: > It seems the difference between these two cases is down to > slot_getsomeattrs being asked to deform up to attnum 1000 for the > create-alter.sql case, and only up to attnum 10 for the create.sql > case. Both plans are using physical tlists per EXPLAIN VERBOSE. I've > not managed to narrow down the reason for the difference yet.
There's logic in the execExpr compiler that detects the last attnum we actually reference, if memory serves. regards, tom lane