Re: ERROR: MergeAppend child's targetlist doesn't match MergeAppend

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ERROR: MergeAppend child's targetlist doesn't match MergeAppend
Date: 2011-11-09 07:38:52
Message-ID: 4EBA2E0C.2090106@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-11-09 08:38:52 Re: pg_comments (was: Allow \dd to show constraint comments)
Previous Message Tom Lane 2011-11-09 05:21:24 Re: type privileges and default privileges