Re: UNION ALL - Var attno

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sri harsha <sriharsha9992(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: UNION ALL - Var attno
Date: 2016-04-29 13:35:23
Message-ID: 12413.1461936923@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

sri harsha <sriharsha9992(at)gmail(dot)com> writes:
> Its not an OpExpr . It is a VAR , got it from "reltargetlist" in base
> relation ( RelOptInfo) .

Read the comment:

* reltargetlist - List of Var and PlaceHolderVar nodes for the values
* we need to output from this relation.
* List is in no particular order, but all rels of an
* appendrel set must use corresponding orders.
* NOTE: in an appendrel child relation, may contain
* arbitrary expressions pulled up from a subquery!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In general, it's seldom a good idea to assume that a Node is of a specific
type without having confirmed that with an IsA() check.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-04-29 13:45:08 Re: [sqlsmith] Failed assertion in BecomeLockGroupLeader
Previous Message Christian Ullrich 2016-04-29 13:29:37 Re: pgsql: Support building with Visual Studio 2015