pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Joe Conway <mail@joeconway.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hackers (PostgreSQL) <pgsql-hackers@postgresql.org>
Subject: Re: VALUES clause memory optimization
Date: Fri, 25 Aug 2006 23:35:40 -0400 (EDT)
Message-ID: <200608260335.k7Q3ZeJ04955@momjian.us> (raw)
In-Reply-To: <44D2CCA4.8040507@joeconway.com>


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 no other pointers to it.  That doesn't apply in the general case of
> > grammar output.
> 
> 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.
> 
> In terms of freeing an entire arbitrary node, could we create a 
> backend/nodes/freefuncs.c file that does a recursive freeObject() 
> similar to the way copyObject() does in backend/nodes/copyfuncs.c?
> 
> > My advice is to get that low-hanging fruit
> > in transformInsertRow and leave the other ideas for 8.3.
> 
> OK. This should be safe also, correct?
> 
> Thanks,
> 
> Joe
> 
> 8<----------------------------------------
> diff -c -r1.341 analyze.c
> *** src/backend/parser/analyze.c	2 Aug 2006 01:59:46 -0000	1.341
> --- src/backend/parser/analyze.c	2 Aug 2006 05:13:20 -0000
> ***************
> *** 2191,2196 ****
> --- 2196,2202 ----
>    	for (i = 0; i < sublist_length; i++)
>    	{
>    		coltypes[i] = select_common_type(coltype_lists[i], "VALUES");
> + 		list_free(coltype_lists[i]);
>    	}
> 
>    	newExprsLists = NIL;
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



view thread (4+ messages)  latest in thread

Message-ID: <200608260335.k7Q3ZeJ04955@momjian.us>
Permalink:  ../200608260335.k7Q3ZeJ04955@momjian.us/
Also on:    postgresql.org/message-id/200608260335.k7Q3ZeJ04955@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, mail@joeconway.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: VALUES clause memory optimization
  In-Reply-To: <200608260335.k7Q3ZeJ04955@momjian.us>
  References: <44D2CCA4.8040507@joeconway.com> <200608260335.k7Q3ZeJ04955@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox