Re: server crash: displaying sqlerrm in exception block - Mailing list pgsql-bugs

From Asif Ali
Subject Re: server crash: displaying sqlerrm in exception block
Date
Msg-id c5110cc50702080717h49e73e28if11e47671cd24ed5@mail.gmail.com
Whole thread Raw
In response to Re: server crash: displaying sqlerrm in exception block  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: server crash: displaying sqlerrm in exception block  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@sss.pgh.pa.us> wrote:
>
> "Asif Ali" <asifalirehman@gmail.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: server crash: displaying sqlerrm in exception block
Next
From: Tom Lane
Date:
Subject: Re: server crash: displaying sqlerrm in exception block