Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sunpeng <bluevaley@xxxxxxxxx> 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 can't.  The fact that there's nodeToString support for all Plan node
types is only intended as a debugging aid --- there's no intention that
it should be possible to serialize and deserialize plans this way.

You didn't say what it is you actually hope to accomplish, but maybe
asking plancache.c to store the plan for you would do.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux