Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Aug 22, 2011 at 4:16 PM, Erik Rijkers <er(at)xs4all(dot)nl> wrote:
>> The below SQL causes:
>> TRAP: FailedAssertion("!(item_width > 0)", File: "costsize.c", Line: 3274)
> I can reproduce this on master but not on 9.0. I suspect the problem
> was introduced by this commit:
> commit 0f61d4dd1b4f95832dcd81c9688dac56fd6b5687
Well, that's a pretty safe bet considering the Assert is in code that
didn't exist before that commit ;-). The question is why the per-column
width estimate hasn't been set for that column. Looking at the
coredump, I see that the width *did* get set for the subquery's other
output column, which makes it even weirder. Too tired to dig further
right now though.
regards, tom lane