Skip site navigation (1) Skip section navigation (2)

Re: server crash: displaying sqlerrm in exception block

From: "Asif Ali" <asifalirehman(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: server crash: displaying sqlerrm in exception block
Date: 2007-02-08 15:17:50
Message-ID: c5110cc50702080717h49e73e28if11e47671cd24ed5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
here is the test case


CREATE  OR REPLACE FUNCTION func() RETURNS int as $$
BEGIN
RAISE EXCEPTION 'ex -----';
EXCEPTION
WHEN OTHERS THEN
RAISE INFO 'sql error msg %',sqlerrm;
DECLARE
v_msg VARCHAR(200) := sqlerrm;
BEGIN
RAISE INFO 'sql error msg %',sqlerrm;       -- it show's <NULL>
RAISE INFO 'sql error v_msg %',v_msg;     -- it show's <NULL>
  ENd;
RETURN 0;
END;
$$ LANGUAGE plpgsql;


Regards,
--Asif

On 2/8/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Asif Ali" <asifalirehman(at)gmail(dot)com> writes:
> > your patch fixes the crash but instead of displaying the sqlerrm value,
> it
> > is displaying <NULL> in
> > pl block, declared inside exception block.
>
> Hm, not what I see here.  Could you submit a test case that does that?
>
>                         regards, tom lane
>



-- 
Regards,
--Asif Ali Rehman

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-02-08 15:37:39
Subject: Re: server crash: displaying sqlerrm in exception block
Previous:From: Tom LaneDate: 2007-02-08 14:54:05
Subject: Re: server crash: displaying sqlerrm in exception block

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group