Re: [HACKERS] freefuncs.c is never called from anywhere!?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] freefuncs.c is never called from anywhere!?
Дата
Msg-id 18901.949213971@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: [HACKERS] freefuncs.c is never called from anywhere!?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Ответы RE: [HACKERS] freefuncs.c is never called from anywhere!?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> As far as I see,freeObject() has a fundamental problem.
> Probably it couldn't free multiple references safely.

Yes, that code will have a problem with node trees that have
circular references or multiple links to the same node.
Both of which are cases that we can currently generate :-(.

Of course, circular links will also break copyfuncs, equalfuncs,
and printfuncs.  We have a known bug with the backend crashing
when -d is enabled for certain queries, because of infinite
recursion in printfuncs.

For the moment, the only thing I need the freefuncs code for is
to free nodetrees that have been created by stringToNode.  AFAICT
that routine is incapable of creating circular links or multiple
links, so it should work.

Eventually it would be nice to have a better solution.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] freefuncs.c is never called from anywhere!?
Следующее
От: Adriaan Joubert
Дата:
Сообщение: Re: [HACKERS] Bit strings