Re: How to get value of 'Param' of the WHERE clause in the FDW?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitry Chichkov <dchichkov(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to get value of 'Param' of the WHERE clause in the FDW?
Date: 2015-09-25 20:51:01
Message-ID: 21003.1443214261@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dmitry Chichkov <dchichkov(at)gmail(dot)com> writes:
> Evaluate via ExecEvalExpr, right?

Yeah.

> And sorry for a beginner question,
> what do I need to do to get that Expr from ForeignScanState? Is it
> accessible at all in old 9.1 API?

I think you're out of luck before 9.2. There's no provision for
expressions to be executed by the FDW itself in 9.1. And you can't
really work around that behind the planner's back, because if you put
an expression into your private fdw state, it won't get adjusted properly
during setrefs.c cleanup.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-09-25 21:39:10 Re: Reusing abbreviated keys during second pass of ordered [set] aggregates
Previous Message Dmitry Chichkov 2015-09-25 19:58:37 Re: How to get value of 'Param' of the WHERE clause in the FDW?