Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify - Mailing list pgsql-hackers

From Bernd Helmle
Subject Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify
Date
Msg-id 00B3A90CC3E2A8BB67D0FC2D@localhost
Whole thread Raw
In response to Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

--On 13. Juni 2013 11:06:31 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:

> My
> recommendation would be to see if you can't save the relevant info in
> the RelOptInfo node for the relation, probably during GetForeignPlan,
> and then get it from there in PlanForeignModify instead of digging in
> the plan tree.  (You can use the fdw_private field of RelOptInfo for
> whatever you need in this line.)

Hmm, I tried this already, but maybe i'm doing something entirely wrong 
here.

What i tried before was to access (in PlanForeignModify) the RelOptInfo 
structure through PlannerInfo->simple_rel_array, assuming the the 
resultRelation index points to the right array member. However, that didn't 
work, the fdw_private List is not the one filled by GetForeignPlan...is 
there another way to get back the RelOptInfo worked on earlier?

-- 
Thanks
Bernd



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Next
From: Jeff Janes
Date:
Subject: single-user vs standalone in docs and messages