Re: ERROR: MergeAppend child's targetlist doesn't match MergeAppend
Teodor Sigaev <teodor@sigaev.ru>
From: Teodor Sigaev <teodor@sigaev.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2011-11-09T07:38:52Z
Lists: pgsql-hackers
> After some thought and experimentation, the best fix seems to be to
> eliminate the ambiguity by wrapping subquery outputs in PlaceHolderVars
> whenever there is a risk of confusion. The attached crude patch fixes
> both test cases. It needs work (more comments and a regression test
> case would be good), but barring objection I'll push forward with doing
> it this way.
Thank you, your patch fixes original query too.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/