Re: [GENERAL] Small patch for PL/Perl Misbehavior with Runtime Error Reporting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Worsley <lx(at)openvein(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Small patch for PL/Perl Misbehavior with Runtime Error Reporting
Date: 2002-10-05 03:51:12
Message-ID: 661.1033789872@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Worsley <lx(at)openvein(dot)com> writes:
> Yeah, that's a cleaner solution. I take it anything pstrdup'd by
> PostgreSQL gets freed automatically by the backend?

Pretty much. The only situation where it wouldn't be is if
CurrentMemoryContext is pointing at TopMemoryContext or another
long-lived context --- but we are *very* chary about how much code we
allow to run with such a setting. User-definable functions can safely
assume that palloc'd space will live only long enough for them to return
something to their caller in it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-05 03:53:37 Re: Threaded Sorting
Previous Message John Worsley 2002-10-05 03:41:45 Re: [GENERAL] Small patch for PL/Perl Misbehavior with