RE: [HACKERS] copyObject() ? again

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] copyObject() ? again
Date: 1999-03-03 02:53:46
Message-ID: 000601be6521$0e43c0c0$2801007e@cadzone.tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello all,

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)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(at)tpf(dot)co(dot)jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-03-03 03:15:50 Re: [COMMITTERS] 'pgsql/src/backend/parser parse.h gram.c'
Previous Message Thomas G. Lockhart 1999-03-03 02:45:11 Re: [COMMITTERS] 'pgsql/src/backend/parser parse.h gram.c'