Re: PlannerInfo Structure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ana Carolina Brito de Almeida <anacrl(at)ig(dot)com(dot)br>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PlannerInfo Structure
Date: 2009-06-10 17:45:05
Message-ID: 8572.1244655905@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ana Carolina Brito de Almeida <anacrl(at)ig(dot)com(dot)br> writes:
> I created a function which needs build or find a relation (RelOptInfo).
> The build is ok.
> On the other hand, I can't find the relation. I have all informations that
> pg_plan_query has: querytree (Query), cursorOptions (int),
> boundParams(ParamListInfo) and plan (PlannedStmt).
> So, how can I take RelOptInfo by these parameters?
> I thought in use "find_base_rel", but it needs the PlannerInfo structure
> that I don't have.
> Do you recommend another function? How can I find PlannerInfo with
> parameters that I have (Eg.: PlannedStmt)?

You can't; it's a transient structure and it's already gone after the
planner returns. If you are plugging into the planning process
somewhere, it should be getting passed to you, but the data isn't
kept around after the plan is completed.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-06-10 17:53:59 Re: Resolving 8.4 open items
Previous Message Tom Lane 2009-06-10 17:40:56 Resolving 8.4 open items