Re: Possible bug in plpgsql/src/gram.y

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible bug in plpgsql/src/gram.y
Date: 2001-07-12 12:07:53
Message-ID: 200107121207.f6CC7rb21774@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Also, can someone tell my why we use malloc in plpgsql?
>
> Plain palloc() won't do because the compiled tree for the function needs
> to outlive the current query. However, malloc() is not cool. Really,
> these structures ought to be built in a memory context created specially
> for each function --- then it'd be possible to reclaim the memory if the
> function is deleted or we realize we need to invalidate its compiled
> tree.
>
> I've had this in mind to do for awhile, but haven't gotten to it.
> Do you want to put it on TODO?

Planned that myself, but dropped the plan again because I
think it'd be better to start more or less from scratch with
a complete new PL that supports modules, global variables and
the like. After 2-3 years we could simply remove the old
style PL/pgSQL then.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-07-12 14:27:33 Re: Child itemid in update-chain marked as unused - can't continue repair_frag
Previous Message Jan Wieck 2001-07-12 12:04:48 Re: Possible bug in plpgsql/src/gram.y