Re: read-only planner input - Mailing list pgsql-hackers

From Neil Conway
Subject Re: read-only planner input
Date
Msg-id 423D57CB.6060902@samurai.com
Whole thread Raw
In response to Re: read-only planner input  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: read-only planner input
List pgsql-hackers
Tom Lane wrote:
> I'd go with PlannerState.  QueryState for some reason sounds more like
> execution-time state.

Well, not to me :) It just makes sense to me that QueryState as the 
working state associated with a Query. Not sure it makes a big 
difference, though.

> Pulling the "planner internal" stuff out of the Query node does seem
> like a good idea, even so.

I've got most of this finished; I'll post a patch soon. One issue I ran 
into is how to handle query_tree_mutator() and query_tree_walker(): they 
both expect to be able to traverse a Query's in_info_list, which my 
patch moves into the QueryState struct. If maintaining this property is 
essential, it seems that we'll need a way to get the QueryState 
associated with a given Query. We can't just change the query tree 
walker to be a "query state walker", since we need to be able to recurse 
into subqueries, and the RTE for a subquery will only contain a Query, 
not its QueryState. Any thoughts on the best way to fix this?

-Neil


pgsql-hackers by date:

Previous
From: Shachar Shemesh
Date:
Subject: Moving a project from gborg to pgfoundry?
Next
From: Markus Bertheau
Date:
Subject: Re: GUC variable for setting number of local buffers