*** test.old/plpgsql.sql	2005-02-22 08:18:27.000000000 +0100
--- test/plpgsql.sql	2005-03-08 09:58:23.419281208 +0100
***************
*** 1917,1920 ****
  create function void_return_expr() returns void as $$
  begin
      return 5;
! end;$$ language plpgsql;
--- 1917,1944 ----
  create function void_return_expr() returns void as $$
  begin
      return 5;
! end;$$ language plpgsql;
! 
! --
! -- Test of built variables SQLERRM and SQLSTATE
! --
! 
! create or replace function trap_exceptions() returns void as $_$
! begin
!   begin
!     raise exception 'first exception';
!   exception when others then
!     raise notice '% %', SQLSTATE, SQLERRM;
!   end;
!   raise notice '% %', SQLSTATE, SQLERRM;
!   begin
!     raise exception 'last exception';
!   exception when others then
!     raise notice '% %', SQLSTATE, SQLERRM;
!   end;
!   return;
! end; $_$ language plpgsql;
! 
! select trap_exceptions();
! 
! 
