Re: PL/pgSQL Memory Management? - Mailing list pgsql-general

From Tom Lane
Subject Re: PL/pgSQL Memory Management?
Date
Msg-id 13206.1014345833@sss.pgh.pa.us
Whole thread Raw
In response to PL/pgSQL Memory Management?  ("Command Prompt, Inc." <pgsql-general@commandprompt.com>)
List pgsql-general
"Command Prompt, Inc." <pgsql-general@commandprompt.com> writes:
> I have a client that was using a PL/pgSQL function called html_linebreaks
> to translate newlines into (X)HTML <br/> tags, and he ran into a serious
> memory issue today which actually brought down his Linux server.

FWIW, I've now tried this in 7.2, and it doesn't seem to leak memory;
but it is unreasonably slow ... which is not too surprising considering
the number of cycles you are expending per byte.  plpgsql is not a good
text-processing language.  This function would be a one-liner in either
plperl or pltcl, and tremendously more efficient too.

            regards, tom lane

pgsql-general by date:

Previous
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: deleting an identical record
Next
From: Tom Lane
Date:
Subject: Re: Createdb problems