EXIT <<Label>> in function

From: "Patrick Fiche" <patrick(dot)fiche(at)aqsacom(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: EXIT <<Label>> in function
Date: 2004-10-11 15:12:01
Message-ID: 00cf01c4afa4$a9b3b280$2e01a8c0@pc3648pfi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

It seems to me that a bug was introduced in 8.0 version.
I'm using Beta3 version on WIN32 platform.

----------------------------------------------------------------------------
--------
CREATE OR REPLACE FUNCTION TEST( ) RETURNS int4 AS '

BEGIN

<<LOOP1>>
LOOP
Raise Notice ''Loop 1'';

EXIT LOOP1;
END LOOP;

RETURN 0;

END'
LANGUAGE 'plpgsql';
----------------------------------------------------------------------------
--------

When I call SELECT TEST(), I get the error message :
ERROR: control reached end of function without RETURN
CONTEXT: PL/pgSQL function "test"

If I just change EXIT LOOP1 to EXIT -> everything is OK

Regards,

Patrick
----------------------------------------------------------------------------
---------------
Patrick Fiche
email : patrick(dot)fiche(at)aqsacom(dot)com
tél : 01 69 29 36 18
----------------------------------------------------------------------------
---------------

Protected by Polesoft Lockspam
http://www.polesoft.com/refer.html

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-10-11 15:18:51 Re: Unable to dump database/table
Previous Message Krok 2004-10-11 15:10:32 Re: Unable to dump database/table