Re: Avoiding memory leak when compilation of a function fails

2025-05-26 Thread Pavel Stehule
út 27. 5. 2025 v 7:27 odesílatel Amul Sul napsal: > On Tue, May 27, 2025 at 4:23 AM Tom Lane wrote: > > > > Back in [1], Andres complained that repeated attempts to create > > an invalid plpgsql function (one that fails initial compilation) > > leak memory, for example > > > > DO $do$ > > BEGIN

Re: Avoiding memory leak when compilation of a function fails

2025-05-26 Thread Amul Sul
On Tue, May 27, 2025 at 4:23 AM Tom Lane wrote: > > Back in [1], Andres complained that repeated attempts to create > an invalid plpgsql function (one that fails initial compilation) > leak memory, for example > > DO $do$ > BEGIN > FOR i IN 1 .. 10 LOOP > BEGIN > CREATE OR REPLACE

Avoiding memory leak when compilation of a function fails

2025-05-26 Thread Tom Lane
Back in [1], Andres complained that repeated attempts to create an invalid plpgsql function (one that fails initial compilation) leak memory, for example DO $do$ BEGIN FOR i IN 1 .. 10 LOOP BEGIN CREATE OR REPLACE FUNCTION foo() RETURNS VOID LANGUAGE plpgsql AS $f$BEGIN fra