BUG #5524: SQLSTATE exception thrown from exception handling block prevents plpgsql function from compiling - Mailing list pgsql-bugs

From Peter Gagarinov
Subject BUG #5524: SQLSTATE exception thrown from exception handling block prevents plpgsql function from compiling
Date
Msg-id 201006251335.o5PDZ5If070540@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5524: SQLSTATE exception thrown from exception handling block prevents plpgsql function from compiling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5524
Logged by:          Peter Gagarinov
Email address:      pgagarinov@alliedtesting.com
PostgreSQL version: 9.0 Beta 2
Operating system:   Windows XP Professional SP2
Description:        SQLSTATE exception thrown from exception handling block
prevents plpgsql function from compiling
Details:

The following function doesn’t seem to compile in PostgreSQL 9.0 while 8.4
accepts it with no problem.

CREATE OR REPLACE FUNCTION test.delete_sessions()
  RETURNS void AS
$BODY$
BEGIN
select 1;
EXCEPTION WHEN SQLSTATE '55P03' THEN
               RAISE SQLSTATE '55P03' using MESSAGE ='test message';
END
$BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100;

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Postgres on AIX5.3 and AIX6.1
Next
From:
Date:
Subject: SQLSTATE exception thrown from exception handling block prevents plpgsql function from compiling