Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group