Re: Continue stmt for plpgsql - Mailing list pgsql-patches

From Neil Conway
Subject Re: Continue stmt for plpgsql
Date
Msg-id 42B8C0E4.8060604@samurai.com
Whole thread Raw
In response to Re: Continue stmt for plpgsql  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway wrote:
> Attached is a revised patch.

Patch applied -- thanks, Pavel. I ended up using ERRCODE_SYNTAX_ERROR
when a CONTINUE is specified outside a loop. BTW, one minor annoyance is:

<<lbl>>
BEGIN
     LOOP
         CONTINUE lbl;
     END LOOP;
END;

The current implementation will raise an error, as it should, but it
does so at runtime, and claims that "CONTINUE cannot be used outside a
loop". We could fix this by dividing labels into "block labels" and
"loop labels" at compile-time and only accepting a loop label for
CONTINUE, but I haven't implemented this yet.

-Neil

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: plperl validator function
Next
From: Neil Conway
Date:
Subject: Re: Removing Kerberos 4