Hello all,
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Wednesday, March 03, 1999 1:52 AM
> To: Hiroshi Inoue
> Cc: pgsql-hackers
> Subject: Re: [HACKERS] copyObject() ? again
>
>
> I'm still not real happy about Hiroshi's proposed reimplementation of
> copyObject. It would make copyObject much slower and more memory-
> hungry, which I think is a bad thing --
Yes,it's a big defect of my implementation.
But isn't it simple and reliable ?
Currently,limited persons could implement copyObject() or
could rearrange structures which cause copyObject() bugs.
And it seems that we should use copyObject() carefully.
I don't know whether we are allowed to use copyObject() in
various phase (parser,optimizer etc) without limitation.
OK,there's a possibility to reduce the number of (old,new) pairs
maintained during copyObject() operations.
In fact,if only SubPlan and Aggref type nodes are maintained,
the cases I reported return proper results.
It may be risky but would improve the performance of my
implementation.
Comments ?
As to the 2nd case I reported,it was probably introduced by my
patch. The patch was made to solve other Aggregate bugs.
get_agg_tlist_references() is used to reconstruct aggs member
node of Agg type nodes as SS_pull_subPlan() does in CopyPlan
Fields(). (The name of function was set_agg_tlist_references()
originally. Probably Bruce changed it).
We may be able to patch by following related code closely.
But it seems strange that copying objects requires such
a complicated procedure.
Thanks in advance.
Hiroshi Inoue
Inoue@tpf.co.jp