| От | Tom Lane |
|---|---|
| Тема | Re: How to restore a Plan from a stored plan text? |
| Дата | |
| Msg-id | 7009.1283575396@sss.pgh.pa.us обсуждение |
| Ответ на | How to restore a Plan from a stored plan text? (sunpeng <bluevaley@gmail.com>) |
| Ответы |
Re: How to restore a Plan from a stored plan text?
|
| Список | pgsql-general |
sunpeng <bluevaley@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 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера