Re: plpgsql's EXIT versus block and loop nesting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: plpgsql's EXIT versus block and loop nesting
Date
Msg-id 12584.1241191807@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql's EXIT versus block and loop nesting  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Tom Lane wrote:
>> Aside from the question of Oracle compatibility, ISTM this behavior
>> is at variance with what our manual says about EXIT:
>> 
>> If no label is given, the innermost loop is terminated and the
>> statement following END LOOP is executed next.

> later in that paragraph:

>     EXIT can be used with all types of loops; it is not limited to use
>     with unconditional loops. *When used with a BEGIN block, EXIT passes
>     control to the next statement after the end of the block.*

Right, but it fails to define what "used with" means.  I think we'd
clarify that to say that you must use a label.

> I'm not opposed to changing that, though. I've bumped into the same 
> incompatibility with Oracle. Is it appropriate for 8.4 given that we're 
> in beta already?

I think so, since it's only beta1.  We have other user-visible changes
in the pipeline already, eg fixing Unicode literals to not be a security
hazard.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: windows shared memory error
Next
From: Robert Haas
Date:
Subject: Re: Throw some low-level C scutwork at me