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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] freefuncs.c is never called from anywhere!?
Date: 2000-01-30 06:32:51
Message-ID: 18901.949213971@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adriaan Joubert 2000-01-30 14:43:18 Re: [HACKERS] Bit strings
Previous Message Hiroshi Inoue 2000-01-30 06:05:13 RE: [HACKERS] freefuncs.c is never called from anywhere!?