Re: [GENERAL] How to restore a Plan from a stored plan text?

2010-09-04 Thread Tom Lane
sunpeng blueva...@gmail.com writes: Thanks for your help!The motivation is that I try to find the most used sub plan ,and cach the sub plan's execution result and store sub plan itself on disk. Even the sub plan's connection is closed, the consequent connection with the same sub plan could

[GENERAL] How to restore a Plan from a stored plan text?

2010-09-03 Thread sunpeng
I've used the following codes to translate the PlannedStmt node to a char string: PlannedStmt * pltl = (PlannedStmt *) linitial(plantree_list); Plan *pl = pltl-planTree; char *s; s = nodeToString(pl); How to restore from this s to Plan? I noticed using func parseNodeString() in

Re: [GENERAL] How to restore a Plan from a stored plan text?

2010-09-03 Thread Tom Lane
sunpeng blueva...@gmail.com writes: I've used the following codes to translate the PlannedStmt node to a char string: PlannedStmt * pltl = (PlannedStmt *) linitial(plantree_list); Plan *pl = pltl-planTree; char *s; s = nodeToString(pl); How to restore from this s to Plan? You

Re: [GENERAL] How to restore a Plan from a stored plan text?

2010-09-03 Thread sunpeng
Thanks for your help!The motivation is that I try to find the most used sub plan ,and cach the sub plan's execution result and store sub plan itself on disk. Even the sub plan's connection is closed, the consequent connection with the same sub plan could utilize the stored cached result. For