Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Hmm, yeah, in an assert-enabled build of HEAD it dies with:
> TRAP: FailedAssertion(!(attno > 0), Archivo: /pgsql/source/HEAD/src/backend/executor/execJunk.c, Lnea: 251)
> I don't have time to track this down right now ...
It's a shortcoming in the PlanRowMark+resjunk column data structure:
when we flatten subqueries, the rangetable indexes of the relations
to be row-locked can change, but the resjunk column names already
assigned to represent their ctid's aren't updated. Working on a
fix now.
regards, tom lane