Re: Using EXIT and labels to exit blocks of statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Danny Lo <lo(dot)dannyk(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Using EXIT and labels to exit blocks of statements
Date: 2010-03-03 00:58:29
Message-ID: 27678.1267577909@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Danny Lo <lo(dot)dannyk(at)gmail(dot)com> writes:
>> Following error. Just want to know correct way to use label. Thanks very
>> much.

You need to put the <<label>> before the DECLARE, not after --- see the
syntax examples here:
http://www.postgresql.org/docs/8.4/static/plpgsql-structure.html

I think it's a bug that it's not throwing an error for the label
placement as you have it.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Atif Jung 2010-03-03 10:48:31 Array or not Array?
Previous Message Danny Lo 2010-03-02 21:39:42 Using EXIT and labels to exit blocks of statements