Re: [HACKERS] copyObject() ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] copyObject() ?
Date
Msg-id 11353.919782973@sss.pgh.pa.us
Whole thread Raw
In response to copyObject() ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] copyObject() ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
RE: [HACKERS] copyObject() ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> AFAIC the relation between objects is not copied correctly 
> by copyObject() (i.e the same pointers to an object are copied 
> to different pointers by copyObject()). 

True, but it seems irrelevant to me --- as Jan Wieck was just pointing
out, no code should ever depend on pointer-equality in parse trees or
plan trees anyway.

> There is a way to maintain the list of (old,new) pairs during 
> copyObject() operations.

I think we'd be better off fixing any places that mistakenly assume
pointer compare is sufficient.  You didn't say which version you were
testing, but we know there are a few bugs like that in the current
CVS sources because of collateral damage from the EXCEPT/INTERSECT
patch.  I believe the plan is to either fix them or back out the patch
before 6.5.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: Anyone understand shared-memory space usage?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] copyObject() ?