From: | Robert Hentosh <hentosh(at)io(dot)com> |
---|---|
To: | bs(at)niggard(dot)org, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: PostgreSQL 7.1.1: Backend crash when calling plpgsql function |
Date: | 2001-05-09 14:06:12 |
Message-ID: | 20010509090612.A4794@eris.io.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
This looks similar to the issue I reported. Tom has already placed a
patch in CVS that works for me. fetch the latest
pgsql/src/pl/plpgsql/src/pl_exec.c file from CVS in the REL7_1_STABLE
branch.
Going back to 7.1 also fixes this problem.
On Wed, May 09, 2001 at 08:54:03AM -0400, pgsql-bugs(at)postgresql(dot)org wrote:
> (bs(at)niggard(dot)org) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> PostgreSQL 7.1.1: Backend crash when calling plpgsql function
>
> Long Description
> Hi, while porting a 6.5 app to 7.1.1 i found a plpgsql function that crashes the backend. Other functions work though. When i rewrite the function to be more sane, the crash doesnt happen anymore. Still the backend shouldnt crash (and it didnt in 6.5 btw).
>
> The whole db dump is about 28megs if anyone is interested.
>
> In case it matters: the 7.1.1 was installed over a 7.0.3, so maybe there is some plpgsql versioning conflict??
>
> Thanks.
>
>
> Sample Code
> Crashing function:
> CREATE FUNCTION "new_news" (varchar ) RETURNS int4 AS '
> DECLARE
> uid_p varchar;
> BEGIN
> Select l.uid into uid_p from nachrichten2 n2, luser l
> WHERE l.uid = $1
> AND l.uid = n2.uid
> AND id > letzte_nachricht
> group by l.uid;
> IF uid_p ISNULL THEN
> RETURN 0;
> END IF;
> RETURN 1;
> END;
> ' LANGUAGE 'plpgsql';
>
> Not crashing function:
> CREATE FUNCTION "new_news" (varchar ) RETURNS int4 AS '
> BEGIN
> IF NOT EXISTS(
> Select l.uid from nachrichten2 n2, luser l
> WHERE l.uid = $1
> AND l.uid = n2.uid
> AND id > letzte_nachricht
> ) THEN
> RETURN 0;
> END IF;
> RETURN 1;
> END;
> ' LANGUAGE 'plpgsql';
>
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Hentosh | 2001-05-09 14:07:42 | Re: Another plpgsql crash |
Previous Message | pgsql-bugs | 2001-05-09 13:15:16 | Another plpgsql crash |