How to restore a Plan from a stored plan text?

From: sunpeng <bluevaley(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to restore a Plan from a stored plan text?
Date: 2010-09-04 04:22:34
Message-ID: AANLkTim2HvCaPoJOQFiciwXFSpWJ-GOK3D6NVmJv9TKf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 /backends/nodes/readfuncs.c
can't work, for example there is no codes translating into Agg node, should
I write my code to parse this string back into PlannedStmt node?
Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-09-04 04:43:16 Re: How to restore a Plan from a stored plan text?
Previous Message Merlin Moncure 2010-09-03 20:49:39 Re: How can I use parameters in plain sql