Re: How to get value of 'Param' of the WHERE clause in the FDW? - Mailing list pgsql-hackers

From Dmitry Chichkov
Subject Re: How to get value of 'Param' of the WHERE clause in the FDW?
Date
Msg-id CADeuJh7FNybFVQCZpBTjSQ2pwnR28D_1=47C9aeqtDVxSowUXg@mail.gmail.com
Whole thread Raw
In response to Re: How to get value of 'Param' of the WHERE clause in the FDW?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to get value of 'Param' of the WHERE clause in the FDW?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<div dir="ltr"><div class="gmail_extra">Evaluate via ExecEvalExpr, right?     And sorry for a beginner question,  what
doI need to do to get that Expr from ForeignScanState?    Is it accessible at all in old 9.1 API?<br /><br /></div><div
class="gmail_extra">Isee code that is getting exec_exprs  from ForeignScan *node:<br />  ForeignScan *fsplan =
(ForeignScan*)node->ss.ps.plan;    <br />  List *exec_exprs = (List *)ExecInitExpr((Expr *)fsplan->fdw_exprs,
(PlanState*)node);<br /> <br /></div><div class="gmail_extra">  then it goes through the list, initializes
paramDesc/ExprStateand executes it via ExecEvalExpr.   Is that what I should do to get that 'abc123' value?    <br
/><br/>And I'm getting  "‘ForeignScan’ has no member named ‘fdw_exprs’" in the 9.1 API.  Is it possible to do in
9.1?<br/><div class="gmail_extra"><br /></div></div><div class="gmail_extra"><br />....<br /><br />Is there some
alternativeway to flatten these subexpressions into consts, before they are passed to FDW?<br /><br />Kind Regards,<br
/></div><divclass="gmail_extra">Dmitry<br /></div><div class="gmail_extra"><br /><br /><br /></div><div
class="gmail_extra"><br/><br /><div class="gmail_quote">On Fri, Sep 25, 2015 at 11:54 AM, Tom Lane <span
dir="ltr"><<ahref="mailto:tgl@sss.pgh.pa.us" target="_blank">tgl@sss.pgh.pa.us</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"><divclass="" id=":vf" style="overflow:hidden">ith that, and certainly<br /> a Param
shouldnot be a special case in any w</div></blockquote></div><br /><br /></div></div> 

pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!
Next
From: Tom Lane
Date:
Subject: Re: How to get value of 'Param' of the WHERE clause in the FDW?