SQLSTATE exception thrown from exception handling block prevents plpgsql function from compiling

Started by Peter Gagarinovalmost 16 years ago1 messagesbugs
Jump to latest
#1Peter Gagarinov
pgagarinov@alliedtesting.com

PostgreSQL 9.0 Beta2, Windows XP Professional SP2.

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;