Thread: stringToNode() for plan nodes...

stringToNode() for plan nodes...

From
"Katsaros Kwn/nos"
Date:
Hi!

I have a problem with stringToNode() function. I'm trying to convert a
Plan into its ASCII representation. This seems to succeed. The problem
is that when I try to convert it back with stringToNode() the following
error is reported:

" ERROR:  badly formatted node string "SEQSCAN :startup_cost 0.00
:tota"... "

In  other words stringToNode(nodeToString(plan)) fails.

I've read somewhere that there is no support in stringToNode() for Plan
nodes.Is this true? I want it to work in order to store (in ASCII
format) and then read a Plan from disc. Any suggestions...?

Thanks in advance!
Katsaros Kwn/nos


Re: stringToNode() for plan nodes...

From
Tom Lane
Date:
"Katsaros Kwn/nos" <ntinos@aueb.gr> writes:
> I've read somewhere that there is no support in stringToNode() for Plan
> nodes.Is this true?

Why would you doubt the statement in readfuncs.c?

 * NOTES
 *      Path and Plan nodes do not have any readfuncs support, because we
 *      never have occasion to read them in.    (There was once code here that
 *      claimed to read them, but it was broken as well as unused.)  We
 *      never read executor state trees, either.

            regards, tom lane