Re: [HACKERS] VALUES clause memory optimization

2006-08-26 Thread Joe Conway
Bruce Momjian wrote: Has this been addressed? Tom Lane wrote: The reason we could safely list_free inside transformInsertRow is that we know all its callers have just built the passed-in list and so there are no other pointers to it. That doesn't apply in the general case of grammar output.

Re: [HACKERS] VALUES clause memory optimization

2006-08-25 Thread Bruce Momjian
Has this been addressed? --- Joe Conway wrote: > Tom Lane wrote: > > The reason we could safely list_free inside transformInsertRow is that > > we know all its callers have just built the passed-in list and so there > > are

Re: [HACKERS] VALUES clause memory optimization

2006-08-03 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > What about for the specific case of an InsertStmt? It seems that we > could at least get away with freeing the raw-expression list in that case. Not sure ... what about rules, BETWEEN, yadda yadda? > In terms of freeing an entire arbitrary node, could we

Re: [HACKERS] VALUES clause memory optimization

2006-08-03 Thread Joe Conway
Tom Lane wrote: The reason we could safely list_free inside transformInsertRow is that we know all its callers have just built the passed-in list and so there are no other pointers to it. That doesn't apply in the general case of grammar output. What about for the specific case of an InsertStm

Re: [HACKERS] VALUES clause memory optimization (was: Values list-of-targetlists patch...)

2006-08-03 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > In transformExpr the comment implies that it should be safe to reapply > to an already transformed expression. What if we free the raw_parser > expression list/cells/nodes and replace it with the as-transformed one? How are you going to do the "replace" bit

[HACKERS] VALUES clause memory optimization (was: Values list-of-targetlists patch...)

2006-08-02 Thread Joe Conway
Tom Lane wrote: I think we could safely list_free the input list in transformInsertRow as your patch suggests, which would buy back the 144M part. But I don't believe it's safe at all to free the raw_parser output --- the grammar sometimes makes multiple links to the same subtree, eg in BETWEEN.